我试图在我的窗口上运行我的节点项目, 但是当我想使用命令时:
npm install or npm update
显示以下错误
我已经删除了节点并重新安装了它,但仍然存在同样的问题。
os: windows 10
node version: 8.8.1
npm version: 5.4.2
我的package.json文件
{
"name": "mytasklist",
"version": "1.0.0",
"description": "Simple task manager",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"binary": "^0.3.0",
"body-parser": "^1.17.2",
"dataformat": "^1.0.0",
"dateformat": "^2.0.0",
"ejs": "^2.5.7",
"express": "^4.15.4",
"fs": "0.0.1-security",
"fs-extra": "^4.0.2",
"html-pdf": "^2.2.0",
"hummus": "^1.0.83",
"js-base64": "^2.3.2",
"js-sha256": "^0.6.0",
"mocha": "^4.0.1",
"mongojs": "^2.4.0",
"mssql": "^4.1.0",
"multer": "^1.3.0",
"node-base64-image": "^1.0.4",
"node-pdftk": "^1.1.1",
"pdfkit": "^0.8.3",
"pdftohtmljs": "^0.4.2",
"phantom-html-to-pdf": "^0.5.5",
"phantomjs": "^2.1.7",
"request": "^2.81.0",
"requests": "^0.2.2",
"sha256": "^0.2.0",
"soap": "^0.21.0",
"tedious": "^2.0.0",
"winston": "^2.3.1",
"winston-daily-rotate-file": "^1.4.6"
}
}
答案 0 :(得分:2)
错误似乎不是来自npm
,而是来自您的依赖项。所以你可以尝试以下方法。
错误似乎来自依赖:hummus
。该错误消息表明您需要在系统中拥有python
。您可以考虑安装python,然后重试后安装hummus
模块。以下link也可以给出提示。如果它不起作用,您可以考虑从头开始重新启动。
从头开始重新启动
删除package.json
文件。初始化项目npm init
并依次重新安装依赖项。然后,您将能够识别导致安装失败的依赖项。