javascript - react npm run build报错 Error: Unexpected "space" found.
本文介绍了javascript - 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
解决方案
我找到了解决办法,原因是我的App.css文件中有语法错误导致的,特此标记。
这篇关于javascript - react npm run build报错 Error: Unexpected "space" found.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文