问题
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