gpt4 book ai didi

node.js - npm install将项目移到另一个目录时出现错误

转载 作者:行者123 更新时间:2023-12-03 09:04:20 24 4
gpt4 key购买 nike

我有一个在目录中运行的节点项目,我只想将其移动到另一个目录。当我尝试这样做时,当然没有node_modules文件夹,并尝试运行npm install;它给出了这个错误:

npm ERR! addLocal Could not install /Users/me_here
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.8.0
npm ERR! npm v3.7.3

npm ERR! No version provided in package.json

我的package.json如下:
{
"name": "my-amazing-title",
"version": "1.0.0",
"description": "an amazing description",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"author": "My full name",
"license": "MIT",

"dependencies": {
"express": "3.3.5",
"express-react-views": "file:../../",
"js-md5": "^0.4.0",
"react": "^0.14.0",
"react-dom": "^0.14.0",
"request": "^2.69.0",
"webpack": "^1.12.14"
}
}

最佳答案

我可以通过更改以下行来npm安装您的package.json:

"express-react-views": "file:../../",


"express-react-views": "~0.10.0", //the current version at date of posting

关于node.js - npm install将项目移到另一个目录时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36140237/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com