首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >lite-server未启动| node模块权限?

lite-server未启动| node模块权限?
EN

Stack Overflow用户
提问于 2021-12-04 15:12:15
回答 1查看 40关注 0票数 0

当我尝试启动lite-server时,我得到了这个错误。我不确定还需要什么其他信息,但如果需要的话,我很乐意提供更多。我在Manjaro Linux上运行它,不确定这是否与它有关。

代码语言:javascript
复制
> 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文件

代码语言:javascript
复制
{
  "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"
}
EN

回答 1

Stack Overflow用户

发布于 2021-12-04 15:45:53

所以,问题出在lite-server安装上。我删除了node_modules文件夹并重新安装。这解决了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70226843

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档