我已经完成了使用创建的反应应用程序
create-react-app
,在本地运行时没有任何问题npm start,但是当我尝试使用构建时
npm-build
我在缩小代码时遇到错误。我尝试克隆我的项目并尝试构建它,我尝试创建一个测试项目并尝试npm build并且没有任何问题,只有当我尝试构建我的完整项目时。
这是我的错误
> test@0.1.0 build C:\Users\Jonathan Stroz\Documents\HackerNews-Production-master
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/newsapi/index.js:20
Read more here:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There …Run Code Online (Sandbox Code Playgroud)