lite-server not launching | node module permissions?

466 Views Asked by At

When I try to start lite-server, I get this error. I'm not sure what other information is needed, but I'll be happy to provide more if necessary. I am running this on Manjaro Linux, not sure if that has anything to do with it.

> [email protected] start /home/matt/Nucamp/2-Bootstrap/NUCAMPSITE
> npm run lite


> [email protected] 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! [email protected] lite: `lite-server`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] 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! [email protected] start: `npm run lite`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the [email protected] 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

Here's my package.json file

{
  "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"
}
1

There are 1 best solutions below

0
Matt On

So, the problem was with the lite-server installation. I removed the node_modules folder and reinstalled. This fixed the issue.