启动React项目失败

在项目中运行npm start后,出现此错误。这是具有预先存在的React代码和React版本16.13.1的项目。该项目还具有istudy-server。

C:\projekti\iStudy\iStudy-Client>npm start

> istudy-client@1.0.0 start C:\projekti\iStudy\iStudy-Client
> npm run clean && npm run webpack-dev-server


> istudy-client@1.0.0 clean C:\projekti\iStudy\iStudy-Client
> rimraf dist


> istudy-client@1.0.0 webpack-dev-server C:\projekti\iStudy\iStudy-Client
> ./node_modules/webpack-dev-server/bin/webpack-dev-server.js

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! istudy-client@1.0.0 webpack-dev-server: `./node_modules/webpack-dev-server/bin/webpack-dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the istudy-client@1.0.0 webpack-dev-server 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\ziga.zupanc\AppData\Roaming\npm-cache\_logs\2020-05-17T20_13_32_566Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! istudy-client@1.0.0 start: `npm run clean && npm run webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the istudy-client@1.0.0 start 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\ziga.zupanc\AppData\Roaming\npm-cache\_logs\2020-05-17T20_13_32_634Z-debug.log
评论
aet
aet

First make sure you have installed all components:

run in root directory:

npm install

之后

npm start
点赞
评论