Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build 打包错误,请问这种报错怎么解决? #1521

Closed
pingGuoNiki opened this issue May 22, 2018 · 6 comments
Closed

npm run build 打包错误,请问这种报错怎么解决? #1521

pingGuoNiki opened this issue May 22, 2018 · 6 comments

Comments

@pingGuoNiki
Copy link

$ npm run build

[email protected] build F:\financial_logistics
cross-env ESLINT=none roadhog build

Failed to compile.

Failed to minify the bundle. Error: index.acf6c1b0.js from UglifyJs
Unexpected token: name (Log) [index.acf6c1b0.js:537,6]
at doneHandler (F:\financial_logistics\node_modules\af-webpack\lib\build.js:91:27)
at emitRecords.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:265:13)
at Compiler.emitRecords (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:371:38)
at emitAssets.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:258:10)
at applyPluginsAsyncSeries1.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:364:12)
at next (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:218:11)
at Compiler.compiler.plugin (F:\financial_logistics\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at next (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:220:14)
at callback (F:\financial_logistics\node_modules\copy-webpack-plugin\dist\index.js:126:17)
at Compiler.afterEmit (F:\financial_logistics\node_modules\copy-webpack-plugin\dist\index.js:220:13)
at Compiler.applyPluginsAsyncSeries1 (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:222:13)
at Compiler.afterEmit (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:361:9)
at require.forEach.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:350:15)
at F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:473:16
at iteratorCallback (F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:1050:13)
at F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:958:16
Read more here: http://bit.ly/2tRViJ9

[graceful-process#5628] exit with code:1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: cross-env ESLINT=none roadhog build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-05-22T02_29_16_172Z-debug.log

@ant-design-bot
Copy link

Translation of this issue:


npm run build Packing error, how to solve this error?

$ npm run build

[email protected] build F:\financial_logistics
cross-env ESLINT=none roadhog build

Failed to compile.

Failed to minify the bundle. Error: index.acf6c1b0.js from UglifyJs
Unexpected token: name (Log) [index.acf6c1b0.js:537,6]
    At doneHandler (F:\financial_logistics\node_modules\af-webpack\lib\build.js:91:27)
    At emitRecords.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:265:13)
    At Compiler.emitRecords (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:371:38)
    At emitAssets.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:258:10)
    At applyPluginsAsyncSeries1.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:364:12)
    At next (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:218:11)
    At Compiler.compiler.plugin (F:\financial_logistics\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
    At next (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:220:14)
    At callback (F:\financial_logistics\node_modules\copy-webpack-plugin\dist\index.js:126:17)
    At Compiler.afterEmit (F:\financial_logistics\node_modules\copy-webpack-plugin\dist\index.js:220:13)
    At Compiler.applyPluginsAsyncSeries1 (F:\financial_logistics\node_modules\tapable\lib\Tapable.js:222:13)
    At Compiler.afterEmit (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:361:9)
    At require.forEach.err (F:\financial_logistics\node_modules\webpack\lib\Compiler.js:350:15)
    At F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:473:16
    At iteratorCallback (F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:1050:13)
    At F:\financial_logistics\node_modules\webpack\node_modules\async\dist\async.js:958:16
Read more here: http://bit.ly/2tRViJ9

[graceful-process#5628] exit with code:1
Npm ERR! code ELIFECYCLE
Npm ERR! errno 1
Npm ERR! [email protected] build: cross-env ESLINT=none roadhog build
Npm ERR! Exit status 1
Npm ERR!
Npm ERR! Failed at the [email protected] build script.
Npm ERR! This is probably not a problem with npm. There is also more likely logging output above.

Npm ERR! A complete log of this run can be found in:
Npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-05-22T02_29_16_172Z-debug.log

@chenshuai2144
Copy link
Collaborator

你引用的第三方库,没有转化成 es5就放上来了,
换掉它

@pingGuoNiki
Copy link
Author

请问那如何把这些库转化为es5呢

@chenshuai2144
Copy link
Collaborator

去 github 提 issue催作者改。
你用的 webpack 还是 roadhog?

@afc163
Copy link
Member

afc163 commented May 22, 2018

sorrycc/blog#68

@chenshuai2144
Copy link
Collaborator

着急应该是去专门提问的地方。
stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants