I have a node project running in a directory, and I simply want to move it to another directory, let's say. When I try that, of course without the node_modules folder, and try to run npm install; it gives this error:
我有一个在一个目录中运行的节点项目,我只想将它移动到另一个目录,比如说。当我尝试时,当然没有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
My package.json is as follows:
我的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"
}
}
1 个解决方案
#1
2
I was able to npm install with your package.json by changing this line:
通过更改此行,我能够使用您的package.json进行npm安装:
"express-react-views": "file:../../",
to
至
"express-react-views": "~0.10.0", //the current version at date of posting
#1
2
I was able to npm install with your package.json by changing this line:
通过更改此行,我能够使用您的package.json进行npm安装:
"express-react-views": "file:../../",
to
至
"express-react-views": "~0.10.0", //the current version at date of posting