UglifyJs打破prod build ...(反应app ...)

时间:2018-02-13 08:50:01

标签: javascript reactjs build

怎么可能我的朋友,拉ax49(分支),使用npm install(有uglify错误)...然后使用master(分支),并且不能用uglify错误编译,那就出现了,但是没关系在编译ax49之前? npm,节点模块或代码如何做到这一点?

我不知道发生了什么,我在我的分支上工作并且使用build-prod命令得到错误:

  

npm run build-prod --prefix。

这是错误(如下)。然后,我去主分支,以确保它至少像以前一样工作,我发现我有同样的错误。我尝试从master分支新的全新安装,npm缓存清除...和同样的错误......

我真的需要一个解决方案,感到绝望, - 你能检测到错误吗? - 我可以在react build prod过程中跳过uglify任务吗? - 怎么调试?

TKS

> tgzapp@0.1.0 build-prod /Users/ax/0-ROOT/com/TGZ2/TogezerEngine/apolloClient
> better-npm-run build-prod

running better-npm-run in /Users/ax/0-ROOT/com/TGZ2/TogezerEngine/apolloClient
Executing script: build-prod

to be executed: npm-run-all -p build-css build-js

> tgzapp@0.1.0 build-css /Users/ax/0-ROOT/com/TGZ2/TogezerEngine/apolloClient
> lessc --clean-css="--compatibility=ie8 --advanced" src/index.less src/index.css


> tgzapp@0.1.0 build-js /Users/ax/0-ROOT/com/TGZ2/TogezerEngine/apolloClient
> react-scripts build

Creating an optimized production build...
Failed to compile.

static/js/main.b7fb8e07.js from UglifyJs
SyntaxError: Unexpected token: name (value) [./~/dotenv/lib/main.js:23,0]

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tgzapp@0.1.0 build-js: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tgzapp@0.1.0 build-js 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!     /Users/ax/.npm/_logs/2018-02-13T08_44_28_705Z-debug.log
ERROR: "build-js" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tgzapp@0.1.0 build-prod: `better-npm-run build-prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tgzapp@0.1.0 build-prod 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!     /Users/ax/.npm/_logs/2018-02-13T08_44_28_762Z-debug.log

0 个答案:

没有答案