Open zhanghaifeng213 opened 5 years ago
@zhanghaifeng213 do not run 'npm start' in windows powershell or cmd, run it in bash.
The same error happens in bash.
Install nodemon globally:
npm install -g nodemon
And change your start script in the package.json file:
"start": "nodemon ./src/index.js",
For me, it works in bash. I believe the reason is the .js suffix is not a executable file extension for Windows cmd.
E:\zhf\work\test\test\study\node\fastify-api-clone\fastify-api>
'.' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fastify-api@1.0.0 start:
./node_modules/nodemon/bin/n ndex.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fastify-api@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is like ging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\admin\AppData\Roaming\npm-cache_logs\201 050Z-debug.log
E:\zhf\work\test\test\study\node\fastify-api-clone\fastify-api>