:
vue family barrel USES the vue-qrcode-directive component to generate the two-dimensional code in the project. There is no error in using NPM run dev in the development process. To NPM run build packaging ERROR, such as the ERROR in the static/js/app f1ecb9a5673e78cc442b. Js from UglifyJs Unexpected token: operator (& gt;) [./~/_vue – [email protected] @ vue – qrcode – directive/index, js: 4, 0] [static/js/app. F1ecb9a5673e78cc442b. Js: 17412] p>
analysis reason strong> :
weback default webpack. Optimize. UglifyJsPlugin cannot compress es6 code files. Along the way, we can simply convert es6 code to ES5 using Babel.
the reason must still be on webpack.config.js. After repeated observations. The problem occurred in the loader configuration, where an item was configured for js file transformation.
solution : (the same problem occurs in _quill-image-drop-module, _vue-qrcode-directive)
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader",
include: [
resolve("src"),
resolve("test"),
resolve(
"node_modules/[email protected]@quill-image-drop-module"
),
resolve(
"node_modules/[email protected]@vue-qrcode-directive"
)
],
}
]
}
div>
Read More:
- Error: Cannot find module’webpack/bin/config-yargs’ solution
- Error: can’t resolve ‘FS’ in (webpack 2 configures CSS loaders)
- Module parse failed:Unexpectedtoken (1:0)You may need an appropriate loader to handle this file type
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Module build failed: Error: ENOENT: no such file or directory, scandir,‘node_modules\node-sass\vend’
- Copy node causes NPM execution error: cannot find module ‘/ / lib / utils/ unsupported.js ‘
- Error: listen EADDRINUSE :::3000
- Solved – problem cannot find module ‘webpack / bin / config yargs’
- Module build failed: SyntaxError: Unexpected token
- Events.js:167 throw er appears when starting node service under linux; // Unhandled ‘error’ event solution
- Fatal error: Newspace:: rebalance allocation failed – process out of memory (memory overflow)
- Module build failed: error: cannot find module ‘node sass’ error
- NPM run dev error: cannot find module ‘webpack cli / bin / config yargs‘
- [Vue] install vuex, error: eperm: operation not permitted, rename
- NPM compilation failed: can’t resolve ‘child_ process’
- Error: unable to resolve dependency for… Could not resolve project
- ERROR in AppModule is not an NgModule No NgModule metadata found for ‘AppModule’.
- Gulp error report, assertionerror [err_ ASSERTION]: Task function must be specified
- Miscellaneous Notes (2)
- Error: Cannot find module ‘webpack/schemas/WebpackOptions.json’