簡體   English   中英

npm ERR! package.json npm在當前目錄中找不到package.json文件

[英]npm ERR! package.json npm can't find a package.json file in your current directory

我正在嘗試使用節點設置一個簡單的服務器實現,但是出現此錯誤:

AC-MacBook-Pro:comments_box ac$ ls
bower_components    comments.json       components.jsx      index.html      node_modules        npm-debug.log
AC-MacBook-Pro:comments_box ac$ npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open '/Users/ac/Projects/funning_around/reactjs/comments_box/package.json'
npm ERR! 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.

npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/ac/Projects/funning_around/reactjs/comments_box
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! path /Users/ac/Projects/funning_around/reactjs/comments_box/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/ac/Projects/funning_around/reactjs/comments_box/npm-debug.log
npm ERR! not ok code 0

package.json丟失,因為錯誤明確指出。 您應該創建此文件。 它可以手動完成,但是第一次npm init可能正是您所需要的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM