当我尝试启动lite-server时,我得到了这个错误。我不确定还需要什么其他信息,但如果需要的话,我很乐意提供更多。我在Manjaro Linux上运行它,不确定这是否与它有关。
> nucampsite@1.0.0 start /home/matt/Nucamp/2-Bootstrap/NUCAMPSITE
> npm run lite
> nucampsite@1.0.0 lite /home/matt/Nucamp/2-Bootstrap/NUCAMPSITE
> lite-server
sh: line 1: /home/matt/Nucamp/2-Bootstrap/NUCAMPSITE/node_modules/.bin/lite-server: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! nucampsite@1.0.0 lite: `lite-server`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the nucampsite@1.0.0 lite script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/matt/.npm/_logs/2021-12-04T14_34_50_365Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! nucampsite@1.0.0 start: `npm run lite`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the nucampsite@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/matt/.npm/_logs/2021-12-04T14_34_50_394Z-debug.log这是我的package.json文件
{
"name": "nucampsite",
"version": "1.0.0",
"description": "This is a website for the fictional campsites review site NuCamp.",
"main": "index.html",
"scripts": {
"lite": "lite-server",
"start": "npm run lite",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"lite-server": "^2.6.1"
},
"dependencies": {
"bootstrap": "^4.5.2",
"bootstrap-social": "^5.1.1",
"font-awesome": "^4.7.0",
"jquery": "^3.5.1",
"popper.js": "^1.16.1"
}发布于 2021-12-04 15:45:53
所以,问题出在lite-server安装上。我删除了node_modules文件夹并重新安装。这解决了这个问题。
https://stackoverflow.com/questions/70226843
复制相似问题