'.' is not recognized as an internal or external command,

ⅰ亾dé卋堺 提交于 2020-05-17 06:22:32

问题


 npm start

> server@1.0.0 start C:\Users\07\OneDrive\Desktop\Final Try\fabcar-blockchain-sample\web-app\server
> ./node_modules/nodemon/bin/nodemon.js src/app.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! server@1.0.0 start: `./node_modules/nodemon/bin/nodemon.js src/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server@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\07\AppData\Roaming\npm-cache\_logs\2020-05-04T13_24_08_021Z-debug.log

'.' is not recognized as an internal or external command,.Here, in this I'm following the basic Hyperledger faberic Fabcar tutorial. But I'm geting error as "'.' is not recognized as an internal or external command". The tutorial which I'm following is, https://github.com/IBM/fabcar-blockchain-sample.


回答1:


Edit package.json and remove the ./.

change

"start": "./node_modules/nodemon/bin/nodemon.js src/app.js"

to

"start": "nodemon src/app.js"

Alternatively, you can try

npm install -g nodemon

and change the start command to

"start": "./node_modules/nodemon/bin/nodemon.js src/app.js"



回答2:


You can also use npx

"start": "npx nodemon src/app.js"

Please note that npx only avaible for lastest LTS node.js version



来源:https://stackoverflow.com/questions/61593377/is-not-recognized-as-an-internal-or-external-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!