警告:總新手在未知的水域中涉水。開始。在Mac終端:如何創建package.json文件?
package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.
Please include the following file with any support request:
npm ERR! /Users/stickupartist/portfolio/npm-debug.log
stickup-artists-macbook-pro:portfolio stickupartist$ npm init
This utility will walk you through creating a package.json file.
什麼工具被引用?
而接下來:
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Name: (portfolio)
I型:
npm install <portfolio> --save
和終端打印出:
Sorry, name can only contain URL-friendly characters.
我在做什麼毛病我命名?我正在使用Meteor,Mac OSX工作本地機器
謝謝!
感謝您對nem的迴應:我嘗試了'npm init'並得到'name:(portfolio)npm WARN init取消'。然後'使用'npm install --save'隨後安裝一個軟件包並 將它作爲依賴項保存在package.json文件中。 隨時按^ C退出。 name:(portfolio) –
我願意嘗試手動完成。我在哪裏可以將package.json保存到?謝謝! –
對你來說最好是閱讀關於[npm init](https://docs.npmjs.com/cli/init)本身的更多信息。他們的文檔將解釋一切。你需要在你的項目的根目錄(頂部)創建'package.json'。 – nem035