react npm run build报错 Error: Unexpected "space" found.

npm run build

> jzpc-app@0.1.0 build /Users/lkp/Desktop/jzpc-app
> react-scripts build

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

./src/App.css
Module build failed: Error: Unexpected "space" found.


npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! jzpc-app@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the jzpc-app@0.1.0 build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jzpc-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs jzpc-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls jzpc-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/lkp/Desktop/jzpc-app/npm-debug.log
阅读 4.8k
2 个回答

我找到了解决办法,原因是我的App.css文件中有语法错误导致的,特此标记。

app.css多了空格

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题