当前位置:网站首页>npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name

npm ERR! 400 Bad Request - PUT xxx - “devDependencies“ dep “xx“ is not a valid dependency name

2022-07-07 04:59:00 Zixia

Due to the development of npm package It's using TS Developed , Use node xx.js Can't compile TS file Need to install ts-node Package to compile TS file , ts-node xx.ts

When using the command to submit code to npm There was a mistake in the above

npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/jsbusiness - “devDependencies” dep “@ts-node” is not a valid dependency name.

translate

npm Make a mistake ! 400 Bad Request - PUT https://registry.npmjs.org/jsbusiness -“devDependencies”dep“@ts-node” Is not a valid dependency name .

Because in devDependencies ( The development environment depends on modules ) Installed ts-node Such packages are not code modules , So use npm At the time of submission Gave us an error prompt , Tell us stay The development environment depends on modules (devDependencies) in There are packages that are not code dependent
Put the dependency module of the prompt in package.json Find , And delete it

原网站

版权声明
本文为[Zixia]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207062214280950.html