I am trying to use node for the first time,installed node.js below is the information
node -v
v14.4.0
npm -v
6.14.5
Completed the setup by creating a package.json file, then tried to install lite-server using the command npm install lite-server --save-dev produced the folllowing error:
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ojhaa\AppData\Roaming\npm-cache\_logs\2020-06-06T06_54_54_480Z-debug.log
Followed by npm cache clean --force
Here is the package.json file
{
"name": "git-test",
"version": "1.0.0",
"description": "\"This is a test directory to learn git and node\"",
"main": "index.html",
"scripts": {
"start": "npm run lite",
"test": "echo \"Error: no test specified\" && exit 1",
"lite": "lite-server"
},
"repository": {
"type": "git",
"url": "git+https://github.com/apoorva0212/git-test.git"
},
"author": "\"Apoorva Ojha\"",
"license": "ISC",
"bugs": {
"url": "https://github.com/apoorva0212/git-test/issues"
},
"homepage": "https://github.com/apoorva0212/git-test#readme"
}
But still I get the same error. Can anyone help me with this? Thank you, in advance.
you are missing the dependency on lite-server
try to install lite-server dependency
npm install lite-server --save-dev
then invoke npm run lite
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.