[英]Error: ENOENT: no such file or directory, lstat while working on Yarn Install
[英]Error on when doing npm install, ENOENT, lstat on Ubuntu
我正在創建一個管理博客帖子的項目(基本上)。 我剛剛在雲平台上安裝了這個,沒問題。 我只是想清理我的node_modules
文件夾,所以我將其刪除並再次使用npm install
。
現在,我不能再安裝mongoose了,所有不同的模塊都創建得很好。 但貓鼬無法安裝。 這讓我瘋狂。
這是我得到的錯誤。
npm ERR! Error: ENOENT, open '/home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/mongodb/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/petur/Documents/WebProjects/soundMixes
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/mongodb/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/ms/0.6.2
npm ERR! Error: ENOENT, lstat '/home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/hooks/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/petur/Documents/WebProjects/soundMixes
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/hooks/README.md
npm ERR! fstream_path /home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/hooks/README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/mquery/README.md'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-37-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/petur/Documents/WebProjects/soundMixes
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/mquery/README.md
npm ERR! fstream_path /home/petur/Documents/WebProjects/soundMixes/node_modules/mongoose/node_modules/mquery/README.md
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
這是我的package.json
{
"name": "soundMixes",
"version": "0.0.0",
"description": "a webapp to manage soundmixes",
"main": "Gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"devDependencies": {
"mongoose" :"",
"grunt": "~0.4.5",
"grunt-cli" : "~0.1.13",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-recess": "~1.0.0",
"grunt-targethtml" : "",
"express" :"",
"mongoose" : "",
"formidable" : "",
"body-parser" : ""
},
"repository": {
"type": "git",
"url": ""
},
"author": "",
"license": "BSD-2-Clause",
"bugs": {
"url": ""
}
}
您應該指定要安裝的最新版本的mongoose,而不是將版本留空。
npm install --save mongoose
我也不確定為什么要在部署時需要將軟件包作為Dev依賴項安裝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.