Error trying to install Axios with npm in a Node.js project - npm

I'm trying to install axios in a personal project for learning Node.js, mongoDB and express and I got stucked at an error when installing it with npm. The problem i get when executing npm i --save axios is this one:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code EPERM
npm ERR! syscall lstat
npm ERR! path F:\Laboral\Elonial\Curso Node.js\4-natours\node_modules\simple-swizzle
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, lstat 'F:\Laboral\Elonial\Curso Node.js\4-natours\node_modules\simple-swizzle'
npm ERR! [Error: EPERM: operation not permitted, lstat 'F:\Laboral\Elonial\Curso Node.js\4-natours\node_modules\simple-swizzle'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'F:\\Laboral\\Elonial\\Curso Node.js\\4-natours\\node_modules\\simple-swizzle'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\djime\AppData\Local\npm-cache\_logs\2023-02-03T12_21_26_556Z-debug-0.log
I already tried installing it into the project with administrator permissions through cmd, but got same error. My package.json follows this right now:
{
"name": "natours",
"version": "1.0.0",
"description": "Project created by NukeSkull in order to learn node.js, express and mongoDB",
"main": "app.js",
"scripts": {
"start": "nodemon server.js",
"start:prod": "SET NODE_ENV=production&&nodemon server.js",
"debug": "ndb server.js",
"watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js",
"build:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js"
},
"author": "NukeSkull",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"express-mongo-sanitize": "^2.2.0",
"express-rate-limit": "^6.6.0",
"helmet": "^3.23.3",
"hpp": "^0.2.3",
"jsonwebtoken": "^8.5.1",
"mapbox-gl": "^2.12.0",
"mongoose": "^5.13.15",
"morgan": "^1.10.0",
"nodemailer": "^6.7.8",
"nodemon": "^2.0.19",
"pug": "^3.0.2",
"slugify": "^1.6.5",
"validator": "^13.7.0",
"xss-clean": "^0.1.1"
},
"devDependencies": {
"eslint": "^8.22.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.1",
"parcel-bundler": "^1.12.5",
"prettier": "^2.7.1"
},
"engines": {
"node": ">=10.0.0"
}
}
How can I solve this error so I can install axios?

Found my error, somehow windows antivirus was blocking me from installing it, disabling it allowed me to install axios. Thanks to #Samball for the answer

Related

Can't execute npm install

When I am executing npm install this error shows. Any advice about this?
PS C:\Users\alex\Downloads\team> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: frontend#0.0.0
npm ERR! Found: #angular/compiler#13.1.3
npm ERR! node_modules/#angular/compiler
npm ERR! #angular/compiler#"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"13.0.3" from #angular/compiler-cli#13.0.3
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~13.0.0" from the root project
npm ERR! peer #angular/compiler-cli#"^13.0.0" from #angular-devkit/build-angular#13.2.2
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^13.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! See C:\Users\ for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\
Here is Package.json file:
{
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"#angular-devkit/build-angular": "^13.1.0",
"#angular/cdk": "^13.1.0",
"#angular/common": "~13.1.0",
"#angular/compiler": "~13.1.0",
"#angular/core": "~13.1.0",
"#angular/forms": "~13.1.0",
"#angular/platform-browser": "~13.1.0",
"#angular/platform-browser-dynamic": "~13.1.0",
"#angular/router": "~13.1.0",
"#types/jquery": "^3.5.13",
"bootstrap": "^5.1.3",
"bootstrap4-toggle": "^3.6.1",
"colors": "^1.4.0",
"jquery": "^3.6.0",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.2.0",
"#angular/cli": "~13.0.4",
"#angular/compiler-cli": "~13.0.0",
"#types/jasmine": "~3.10.0",
"#types/node": "^12.11.1",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.4.3"
}
}
ERESOLVE issues with npm#7 and npm#8 are common because they are more strict about peer dependencies than npm#6. Often, the easiest resolution is to pass the --legacy-peer-deps flag to npm (e.g., npm i --legacy-peer-deps) or else use npm#6.
The "correct" solution is to figure out which of your dependencies need to be updated in package.json to avoid the peer dependency conflict, but that is sometimes not possible with dependencies that are unmaintained. In that case, the solution is to find or create something else to get rid of the unmaintained dependency.
However, 9 times out of 10, someone just wants to get the stuff installed and hope it works, in which case --legacy-peer-deps will do that. Just make sure you have good test coverage because you're using a different peer dependency version than that specified by a package so something somewhere might not work.
To see if the problem will affect your production app, do npm install --production. If it doesn't give you an ERESOLVE error, then the problem is in your dev dependencies only, which is less of a concern typically.

NPM: npm peer dependency conflict

I download a project and it has no package-lock.json file.When I run npm install , there is conflict. The error message:
root#fb3391c63c7f:/app/avatar/avatar-h5# npm install --registry=https://registry.npm.taobao.org
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: avatar#3.2.0
npm ERR! Found: vue#2.6.10
npm ERR! node_modules/vue
npm ERR! vue#"2.6.10" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"3.0.5" from #vue/compiler-sfc#3.0.5
npm ERR! node_modules/#vue/compiler-sfc
npm ERR! peer #vue/compiler-sfc#"^3.0.0-beta.14" from #vue/cli-service#4.5.10
npm ERR! node_modules/#vue/cli-service
npm ERR! peer #vue/cli-service#"^3.0.0 || ^4.0.0-0" from #vue/cli-plugin-babel#4.4.4
npm ERR! node_modules/#vue/cli-plugin-babel
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-18T21_53_07_044Z-debug.log
I read a lot docs and figure out that #vue/cli-plugin-babel#4.4.4 will install lastest #vue/cli-service#4.5.10 .
How can I install it compatible with vue#2.6.10
package.json file
{
"name": "avatar",
"version": "3.2.0",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"boilerplate",
"admin-template",
"management-system"
],
"repository": {
"type": "git",
"url": "https://gitee.com/fairyfleet/avatar.git"
},
"dependencies": {
"#riophae/vue-treeselect": "0.4.0",
"axios": "0.18.1",
"clipboard": "2.0.4",
"core-js": "3.6.5",
"echarts": "4.2.1",
"element-ui": "2.13.2",
"file-saver": "2.0.1",
"js-beautify": "1.10.2",
"fuse.js": "3.4.4",
"js-cookie": "2.2.0",
"jsencrypt": "3.0.0-rc.1",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"screenfull": "4.2.0",
"sortablejs": "1.8.4",
"vue": "2.6.10",
"vue-count-to": "1.0.13",
"quill": "1.3.7",
"vue-cropper": "0.4.9",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vuedraggable": "2.20.0",
"vuex": "3.1.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "4.4.4",
"#vue/cli-plugin-eslint": "4.4.4",
"#vue/cli-plugin-unit-jest": "4.4.4",
"#vue/cli-service": "4.4.4",
"#vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "9.5.1",
"babel-eslint": "10.1.0",
"babel-jest": "23.6.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3",
"plop": "2.3.0",
"runjs": "4.3.2",
"node-sass": "4.14.1",
"sass-loader": "8.0.2",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
Same issue here. It occurs only on newer versions of npm. You can temporarily fix it by falling back on the LTS 14.15 version of NodeJS.
On Linux/MacOS:
nvm use --lts
Or else:
npm install -g npm#6.14.8
What fixed this issue for me was simply removing the node_modules folder and then pasting the package versions in the package json file and running npm install.
To add to Chaim Zonnenberg
I encountered this error when working on a NestJS project on macOS with Node (16.11.1) and npm (8.0.0).
When I run the command npm install I get the error below:
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: admin-gateway#0.0.1
npm ERR! Found: rxjs#7.3.0
npm ERR! node_modules/rxjs
npm ERR! rxjs#"^6.0.0" from the root project
npm ERR! peer rxjs#"^6.0.0 || ^7.0.0" from #nestjs/axios#0.0.1
npm ERR! node_modules/#nestjs/axios
npm ERR! #nestjs/axios#"^0.0.1" from the root project
npm ERR! 4 more (#nestjs/common, #nestjs/core, #nestjs/config, #nestjs/microservices)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! elastic-apm-nest#"0.0.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: rxjs#6.6.7
npm ERR! node_modules/rxjs
npm ERR! peer rxjs#"^6.0.0" from elastic-apm-nest#0.0.7
npm ERR! node_modules/elastic-apm-nest
npm ERR! elastic-apm-nest#"0.0.7" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Here's how I fixed it:
The issue was that I was running a newer version of Node (16.11.1) which was not the long term support (lts) version.
First, I removed the node package that was present on my macOS using the homebrew command:
brew uninstall --ignore-dependencies node
And then I installed nvm using homebrew:
brew install nvm
Next, I created the NVM's working directory since it didn't exist:
mkdir ~/.nvm
Next, I added the following to the ~/.zshrc file or your desired shell
configuration file. For me the ~/.zshrc file did not exist so I created it using the command touch ~/.zshrc, and then opened it using the command:
nano ~/.zshrc
and added the following below:
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
Save the file using the key combinations Ctrl + X and then Y and the ENTER
Next, open a new terminal, and install Node LTS version using the command:
nvm install --lts
If you already have the Node LTS version installed then run the command:
nvm use --lts
Confirm your Node and npm versions using the command:
node --version
npm --version
Finally, run the npm install command again, and this time everything will go fine.
That's all
npm install -g npm#6.14.8
this also works on windows.

vue-cli-service#latest' is not in the npm registry on Windows. Works in WSL

I have a Vue app which I am trying to run using npm run start, but this gives me the following error when I run the command from either PowerShell or inside the VS Code terminal:
> economyapp#0.1.0 start C:\_code\myapp
> npx vue-cli-service serve
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/vue-cli-service - Not found
npm ERR! 404
npm ERR! 404 'vue-cli-service#latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-11-28T17_22_02_307Z-debug.log
Install for [ 'vue-cli-service#latest' ] failed with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! economyapp#0.1.0 start: `npx vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the economyapp#0.1.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! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-11-28T17_22_02_401Z-debug.log
The npm run start command works when I run it from inside WSL, however the server does not hot reload when I make changes to the code. I have tried uninstalling and reinstalling Vue CLI and running npm install.
Here is my package.json:
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "npx vue-cli-service serve",
"build": "npx vue-cli-service build",
"test": "npx vue-cli-service test:unit",
"lint": "npx vue-cli-service lint",
"serve": "npx vue-cli-service serve"
},
"dependencies": {
"axios": "^0.21.0",
"core-js": "^3.4.3",
"lodash": "^4.17.15",
"moment": "^2.24.0",
"register-service-worker": "^1.6.2",
"store2": "^2.11.1",
"vue": "^3.0.0",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
},
"devDependencies": {
"#types/jest": "^24.0.19",
"#typescript-eslint/eslint-plugin": "^2.28.0",
"#typescript-eslint/parser": "^2.28.0",
"#vue/cli-plugin-babel": "^4.1.0",
"#vue/cli-plugin-eslint": "^4.1.0",
"#vue/cli-plugin-pwa": "^4.1.0",
"#vue/cli-plugin-router": "^4.1.0",
"#vue/cli-plugin-typescript": "^4.3.1",
"#vue/cli-plugin-vuex": "^4.1.0",
"#vue/cli-service": "^4.2.3",
"#vue/devtools": "^5.3.3",
"#vue/eslint-config-prettier": "^5.0.0",
"#vue/eslint-config-typescript": "^5.0.2",
"#vue/test-utils": "1.0.0-beta.29",
"eslint": "^6.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^6.0.0",
"lint-staged": "^9.4.3",
"prettier": "^1.19.1",
"typescript": "^3.8.3",
"vue-template-compiler": "^2.6.10"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,vue,ts}": [
"vue-cli-service lint",
"git add"
]
}
}
TL;DR: Run npm install.
vue-cli-service is provided by the #vue/cli-service in your devDependencies. Because you don't specify the package in the npx command, it fails if it has to look in the registry. Without npx, your npm script will look in node_modules/.bin for vue-cli-service. You can remove npx from your npm scripts and you should see the same results you're getting now.
The fact that npx isn't finding vue-cli-service indicates that you have not run npm install. Do that and your npm scripts should work as is. Without running npm install, you will certainly run into other issues once you fix this one.
If, for some reason, you want the npm scripts to work without running npm install, you can tell npx where to find the binary in the registry. Change npx vue-cli-service in your npm scripts to be npx -p #vue/cli-service vue-cli-service instead and it should fix this problem. But you will certainly run into other problems. You'll want npm install regardless.
But to really get at the root of things, you'll need to figure out why the difference between WSL and non-WSL environments in your setup. My guess is that you have #vue/cli-service installed globally somewhere that only WSL finds it in your PATH but that's just a guess.

is there a way to fix 'npm ERR! code ELIFECYCLE in react.js'"

I'm trying to create an application using Django framework as a back-End and React.js as the front-End. the django portion works just fine, but when trying to integrate the react with my app. I get npm ERR! code ELIFECYCLE
npm ERR! errno 2. I am fairly new to this technology and I don't quiet understand where the error is coming from.
I tried cleaning up the cache and deleting the node_modules repo and then npm install but it didn't work. so i turn to you asking for help skilled programmers
this the error i get:
ERROR in Entry module not found: Error: Can't resolve './gentelella/frontend/src/index.js' in 'C:\Users\USER\Desktop\finale\django-gentelella\gentelella'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! gentelella#1.0.0 build: `webpack --mode production ./gentelella/frontend/src/index.js --output ./gentelella/frontend/static/frontend/main.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the gentelella#1.0.0 build 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! C:\Users\USER\AppData\Roaming\npm-cache\_logs\2019-05-22T10_24_53_635Z-debug.log
and this is the package.json:
{
"name": "gentelella",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6"
},
"devDependencies": {
"#babel/core": "^7.4.4",
"#babel/preset-env": "^7.4.4",
"#babel/preset-react": "^7.0.0",
"babel-loader": "^8.0.6",
"babel-plugin-transform-class-properties": "^6.24.1",
"webpack": "^4.32.0",
"webpack-cli": "^3.3.2"
},
"scripts": {
"dev": "webpack --mode development ./gentelella/frontend/src/index.js --output ./gentelella/frontend/static/frontend/main.js",
"build": "webpack --mode production ./gentelella/frontend/src/index.js --output ./gentelella/frontend/static/frontend/main.js"
},
"keywords": [],
"author": "",
"license": "ISC"
}
It seems to me like your path is wrong. Try using removing the gantelella folder from the path, so this leaves 'frontend/src/index.js'.
This assumes you have structured your folders like this:
C:\Users\USER\Desktop\finale\django-gentelella\gentelella\frontend\src\index.js

events.js:154 throw er; // Unhandled 'error' event [duplicate]

This question already has answers here:
Angular2 QuickStart npm start is not working correctly
(32 answers)
Closed 6 years ago.
I got error, when I create angular 2 application. I follow link create sample application. when I run
npm start
I got bellow error,
events.js:154
throw er; // Unhandled 'error' event
^
Error: watch node_modules/weinre/web/weinre/target/WiRuntimeImpl.amd.js ENOSPC
at exports._errnoException (util.js:856:11)
at FSWatcher.start (fs.js:1313:19)
at Object.fs.watch (fs.js:1341:11)
at createFsWatchInstance (/home/mts/project/testSails1/frontend/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/mts/project/testSails1/frontend/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/mts/project/testSails1/frontend/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/mts/project/testSails1/frontend/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher.<anonymous> (/home/mts/project/testSails1/frontend/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at FSReqWrap.oncomplete (fs.js:82:15)
I got npm logs like this,
npm
ERR! Linux 3.19.0-51-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lite"
npm ERR! node v5.6.0
npm ERR! npm v3.8.0
npm ERR! code ELIFECYCLE
npm ERR! frontend#1.0.0 lite: `lite-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend#1.0.0 lite script 'lite-server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the frontend package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! lite-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs frontend
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls frontend
npm ERR!
There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/mts/project/testSails1/frontend/npm-debug.log
npm run lite exited with code 1
How I solve this?
That means you have already run the app, then you attempted to run it one more time without stopping the last run. Therefore, it was conflicted. You must stop the last run <=> click the stop button (red-square button on debug panel).
My previous package.json is,
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.8",
"systemjs": "0.19.22",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.8.2",
"typings":"^0.6.8"
}
}
I added to package.json like this,
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "concurrently \"npm run tsc:w\" \"npm run http\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"http": "http-server -p 3000 -a 127.0.0.1 -o",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.8",
"systemjs": "0.19.22",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"http-server": "^0.9.0",
"typescript": "^1.8.2",
"typings":"^0.6.8"
}
}
now project working find.
there are change only lite ==> http then working find