Error - Unexpected token: name (MockStorage)
See original GitHub issueHey, having this error when run npm run build
-
ERROR in static/js/vendor.1d08fa61caa6133701c2.js from UglifyJs Unexpected token: name (MockStorage) [./node_modules/vuex-persist/dist/esm/index.js:6,0][static/js/vendor.1d08fa61caa6133701c2.js:32405,4]
vuex-persist version - ^1.7.2 vue version - ^2.5.15 vuex version - ^2.5.0
Using this package with localForage storage (local forage version - ^1.7.2)
Thanks !
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Unexpected token: name (DocumentAttributes) with webpack ...
The problem here is with Uglify that cannot process ES6. I solved this problem by using uglifyjs-webpack-plugin instead.
Read more >npm run build报错Unexpected token: name... - 简书
ERROR in static/js/vendor.86e2c6288e81323e1512.js from UglifyJs. Unexpected token: name (MockStorage) [./node_modules/vuex-persist/dist/esm/ ...
Read more >webpack打包报错: name «MockStorage», expected: punc «;»
奈何失败的错误提示信息只有寥寥数语,根本无法定位到问题代码的位置ERROR in build.js from UglifyJs Unexpected token operator «=», expected punc «,» ...
Read more >Build failed SyntaxError: Unexpected token: name (length)
In my case, i was using the vue truffle box and Uglify was the issue as it was the uglify that came with...
Read more >How I Fixed: UglifyJs Unexpected token: name (DropIn)
As the error states, the issue is with the UglifyJs plugin, which I use in combination with WebPack. This is a frustrating show-stopping...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Possible solution is to use UMD module def. instead.
import VuexPersist from 'vuex-persist/dist/umd'
update to 1.8.0