我正在尝试运行命令
npm init -y
Windows命令提示符中的
我的文件夹名称中有空格。
C:\Dans\Courses\Free Courses\JavaScript ES6
我明白了:
Microsoft Windows [Version 10.0.17134.48]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\First>cd C:\Dans\Courses\Free Courses\JavaScript ES6
C:\Dans\Courses\Free Courses\JavaScript ES6>npm init -y
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "init" "-y"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! Invalid name: "JavaScript ES6"
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Dans\Courses\Free Courses\JavaScript ES6\npm-debug.log
C:\Dans\Courses\Free Courses\JavaScript ES6>
我试过它并没有成功。
答案 0 :(得分:0)
看起来像一个未解决的问题:https://github.com/npm/init-package-json/issues/72
无论如何,谁在文件夹名称中使用空格;)