npm install -g #angular/cli failing with syntax error - npm

I have a jenkins job that runs on a centos 7 container.
Once the container is up the jenkins job runs a script that
executes
npm install -g #angular/cli
This has worked for about an year but today it started failing:
/usr/bin/ng -> /usr/lib/node_modules/#angular/cli/bin/ng
> #angular/cli#8.0.4 postinstall /usr/lib/node_modules/#angular/cli
> node ./bin/postinstall/script.js
/usr/lib/node_modules/#angular/cli/bin/postinstall/analytics-prompt.js:8
(async () => {
^
SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/#angular/cli/bin/postinstall/script.js:5:1)
npm ERR! Linux 3.10.0-957.1.3.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "#angular/cli"
npm ERR! node v6.16.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! #angular/cli#8.0.4 postinstall: `node ./bin/postinstall/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the #angular/cli#8.0.4 postinstall script 'node ./bin/postinstall/script.js'.
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 #angular/cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/postinstall/script.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs #angular/cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls #angular/cli
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/capman-fe/npm-debug.log
My packages.json is this:
{
"name": "pman-fe",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
... omitted for brevity ...
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.6.8",
"#angular/cli": "^6.0.8",
"#angular/compiler-cli": "^6.0.3",
"#angular/language-service": "^6.0.3",
"#types/d3": "^5.7.1",
"#types/jasmine": "~2.8.6",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.1",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
}
}

I was able to solve this error. The problem was that when I installed npm I simply executed: yum -y install npm. I guess the yum repo that the container I have to use doesn't have an up to date copy of the npm rpm. So I changed how I install npm. Now I do this:
yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum -y install nodejs
node -v
npm -v
npm install -g #angular/cli
as per https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/

replace
npm install -g #angular/cli
on
npm install -g #angular/cli#~8.0.0
current 8.0.4 version #angular/cli bug with dependency
use ~8.0.0 or less (Ideal for version to match with package.json)

I just encountered the same error on Windows: turns out I had a super old version (v.6.11.0) of Node, so I would just try updating the local version of Node on your centos machine (or whatever environment you are on). Note this will also update your version of npm (most likely).

Related

How to read ERESOLVE in npm audit fix?

Here is the output I have after getting audit warnings after installing an npm package:
$ npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-config-standard-with-typescript#21.0.1
npm ERR! Found: #typescript-eslint/eslint-plugin#5.46.1
npm ERR! node_modules/#typescript-eslint/eslint-plugin
npm ERR! dev #typescript-eslint/eslint-plugin#"^5.46.1" from the root project
npm ERR! peerOptional #typescript-eslint/eslint-plugin#"^5.0.0" from eslint-plugin-unused-imports#2.0.0
npm ERR! node_modules/eslint-plugin-unused-imports
npm ERR! dev eslint-plugin-unused-imports#"^2.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #typescript-eslint/eslint-plugin#"^4.0.1" from eslint-config-standard-with-typescript#21.0.1
npm ERR! node_modules/eslint-config-standard-with-typescript
npm ERR! dev eslint-config-standard-with-typescript#"^21.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #typescript-eslint/eslint-plugin#4.33.0
npm ERR! node_modules/#typescript-eslint/eslint-plugin
npm ERR! peer #typescript-eslint/eslint-plugin#"^4.0.1" from eslint-config-standard-with-typescript#21.0.1
npm ERR! node_modules/eslint-config-standard-with-typescript
npm ERR! dev eslint-config-standard-with-typescript#"^21.0.1" 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!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/lancepollard/.npm/_logs/2023-01-02T17_19_47_490Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lancepollard/.npm/_logs/2023-01-02T17_19_47_490Z-debug-0.log
That came after running npm audit fix --force a few times, after getting this:
$ npm install eslint-plugin-unused-imports --save-dev
added 2 packages, and audited 379 packages in 4s
107 packages are looking for funding
run `npm fund` for details
5 high severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Any ideas what I should be doing here to resolve and get a successful install?
My package.json is:
{
"main": "./host",
"type": "module",
"scripts": {
"build": "tsc && tsc-alias",
"watch": "concurrently --kill-others \"tsc -w\" \"tsc-alias -w\"",
"lint": "eslint --ext .ts ./make",
"lint:fix": "npm run lint -- --fix",
"test": "node host/task/build"
},
"devDependencies": {
"#trivago/prettier-plugin-sort-imports": "^4.0.0",
"#types/glob": "^8.0.0",
"#types/lodash": "^4.14.191",
"#types/node": "^18.11.17",
"#typescript-eslint/eslint-plugin": "^5.46.1",
"#typescript-eslint/parser": "^5.46.1",
"concurrently": "^7.6.0",
"eslint": "^8.30.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard-with-typescript": "^21.0.1",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-n": "^15.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-sort-exports": "^0.8.0",
"eslint-plugin-sort-keys": "^2.3.5",
"eslint-plugin-typescript-sort-keys": "^2.1.0",
"eslint-plugin-unused-imports": "^2.0.0",
"prettier": "2.8.1",
"ts-node": "^10.9.1",
"tsc-alias": "^1.8.2",
"typescript": "^4.9.4"
},
"dependencies": {
"#lancejpollard/pretty-compact-json.js": "^0.2.0",
"chalk": "^5.2.0",
"glob": "^8.0.3",
"lodash": "^4.17.21",
"source-map": "^0.7.4"
}
}
Now I have rm -rf node_modules, and when I do npm install again, it shows the same error....
I had the same problem. Deleting the package-lock.json and the node_modules, and then running npm install solved my issue.
I hope it helps.

Version mismatch vite and quasar

Trying to install Quasar on my Vite (Vue 3) project. Getting the following error:
$ npm install -D #quasar/vite-plugin#latest sass#1.32.12
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: diop-dash#0.0.0
npm ERR! Found: #vitejs/plugin-vue#4.0.0
npm ERR! node_modules/#vitejs/plugin-vue
npm ERR! dev #vitejs/plugin-vue#"^4.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #vitejs/plugin-vue#"^2.0.0 || ^3.0.0" from #quasar/vite-plugin#1.2.3
npm ERR! node_modules/#quasar/vite-plugin
npm ERR! dev #quasar/vite-plugin#"1.2.3" 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.
From this it looks like quasar's vite plugin is looking for the 2.0.0 or 3.0.0 version of #vitejs/plugin-vue but I have 4.0 installed. Is quasar not compatible with the new one, will I run into trouble if I use the --force flag? Is there another way to resolve this that doesn't involve downgrading my Vite setup?
From package.json
"dependencies": {
"#quasar/extras": "^1.15.8",
"pinia": "^2.0.28",
"quasar": "^2.10.2",
"vue": "^3.2.45",
"vue-router": "^4.1.6"
},
"devDependencies": {
"#quasar/vite-plugin": "^1.2.3",
"#rushstack/eslint-patch": "^1.1.4",
"#types/node": "^18.11.12",
"#vitejs/plugin-vue": "^4.0.0",
"#vue/eslint-config-prettier": "^7.0.0",
"#vue/eslint-config-typescript": "^11.0.0",
"#vue/tsconfig": "^0.1.3",
"eslint": "^8.22.0",
"eslint-plugin-vue": "^9.3.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"sass": "^1.32.12",
"typescript": "~4.7.4",
"vite": "^4.0.0",
"vue-tsc": "^1.0.12"
}

Can't use npm install after I updated the version of all nestjs dependencies in my package.json

I have created a new nestjs project and installed several additional standard packages. In the console it said that the packages are outdated and there are 7 red vulnerabilities.
The suggested command npm audit fix --force did't help - there were still 4 red vulnerabilities after that.
I found a command that updates my packages to the latest versions:
npm install -g npm-check-updates
ncu -u
npm install
Now I can't use npm install:
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #nestjs/typeorm#8.0.4
npm ERR! Found: typeorm#0.3.6
npm ERR! node_modules/typeorm
npm ERR! typeorm#"^0.3.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: typeorm#0.2.45
npm ERR! node_modules/typeorm
npm ERR! peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.0.4" 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.
I deleted node_modules as well as the package-lock.json and then forced the installation with npm install --force. But I get again the message about severity vulnerabilities:
npm install --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: #nestjs/typeorm#8.0.4
npm WARN Found: typeorm#0.3.6
npm WARN node_modules/typeorm
npm WARN typeorm#"^0.3.6" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm WARN node_modules/#nestjs/typeorm
npm WARN #nestjs/typeorm#"^8.0.4" from the root project
npm WARN
npm WARN Conflicting peer dependency: typeorm#0.2.45
npm WARN node_modules/typeorm
npm WARN peer typeorm#"^0.2.34" from #nestjs/typeorm#8.0.4
npm WARN node_modules/#nestjs/typeorm
npm WARN #nestjs/typeorm#"^8.0.4" from the root project
added 823 packages, and audited 824 packages in 29s
84 packages are looking for funding
run `npm fund` for details
7 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
I am going in circles and do not understand how to solve the problem. And especially which version I need to use that has no red security issues?
My package.json file now looks like this:
{
"name": "api",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"#nestjs/common": "^8.4.5",
"#nestjs/core": "^8.4.5",
"#nestjs/platform-express": "^8.4.5",
"#nestjs/typeorm": "^8.0.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.5.5",
"sqlite3": "^5.0.8",
"typeorm": "^0.3.6"
},
"devDependencies": {
"#nestjs/cli": "^8.2.6",
"#nestjs/schematics": "^8.0.11",
"#nestjs/testing": "^8.4.5",
"#types/express": "^4.17.13",
"#types/jest": "27.5.1",
"#types/node": "^17.0.35",
"#types/supertest": "^2.0.12",
"#typescript-eslint/eslint-plugin": "^5.26.0",
"#typescript-eslint/parser": "^5.26.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^28.1.0",
"prettier": "^2.6.2",
"source-map-support": "^0.5.21",
"supertest": "^6.2.3",
"ts-jest": "^28.0.3",
"ts-loader": "^9.3.0",
"ts-node": "^10.8.0",
"tsconfig-paths": "^4.0.0",
"typescript": "^4.7.2"
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
Why do I get an indication that I am using typeorm#"^0.2.34" even though my package.json file specifies a newer version "typeorm": "^0.3.6"? This is also the latest version at the moment.
PS: If I change the typorm version back to 0.2.34 or 0.2, I can use npm install again but I get the red "7 high severity vulnerabilities" message.
Same issue for me. Using npm install --legacy-peer-deps seems to fix the issue however vulnerabilities remains.
Hello I just got the some problem as yours it's because the nest and npm commands getting blocked so try to allow it from Windows PowerShell by following these steps here
update to the latest npm version by running this command
npm i -g npm#latest

npm update fails for Vue 2 project, created with vue-cli

I've created a Vue 2 project with vue-cli and tried to run npm update.
Unfortunately, I receive the following error:
{
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: test-vue#0.1.0
npm ERR! Found: vue#2.6.12
npm ERR! node_modules/vue
npm ERR! vue#"~2.6.11" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue#"3.0.7" from #vue/compiler-sfc#3.0.7
npm ERR! node_modules/#vue/compiler-sfc
npm ERR! peerOptional #vue/compiler-sfc#"^3.0.0-beta.14" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.0" from the root project
npm ERR! 1 more (#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!
My package.json looks like this:
{
"name": "test-vue",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"#turf/turf": "^6.3.0",
"bootstrap": "^4.5.3",
"core-js": "^3.6.5",
"leaflet": "^1.7.1",
"leaflet-geodesy": "^0.2.1",
"vue": "~2.6.11",
"vue-router": "~3.2.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "~4.5.0",
"#vue/cli-plugin-eslint": "~4.5.0",
"#vue/cli-plugin-router": "~4.5.0",
"#vue/cli-service": "~4.5.0",
"#vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"prettier": "^1.19.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-template-compiler": "~2.6.11"
}
}
I thought the ~ in the package.json should prevent from upgrading to Vue 3?
You help is appreciated!
EDIT: Tried as suggest with ncu -u
PS E:\projects\test-vue> ncu -u
Upgrading E:\projects\test-vue\package.json
[====================] 20/20 100%
core-js ^3.6.5 → ^3.9.1
vue ~2.6.11 → ~2.6.12
vue-router ~3.2.0 → ~3.5.1
#vue/cli-plugin-babel ~4.5.0 → ~4.5.11
#vue/cli-plugin-eslint ~4.5.0 → ~4.5.11
#vue/cli-plugin-router ~4.5.0 → ~4.5.11
#vue/cli-service ~4.5.0 → ~4.5.11
eslint ^6.7.2 → ^7.21.0
eslint-plugin-prettier ^3.1.3 → ^3.3.1
eslint-plugin-vue ^6.2.2 → ^7.7.0
prettier ^1.19.1 → ^2.2.1
sass ^1.26.5 → ^1.32.8
sass-loader ^8.0.2 → ^11.0.1
vue-template-compiler ~2.6.11 → ~2.6.12
Run npm install to install new versions.
PS E:\projects\test-vue> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: webpack#5.24.3
npm ERR! node_modules/webpack
npm ERR! peer webpack#"^4.0.0 || ^5.0.0" from #soda/friendly-errors-webpack-plugin#1.8.0
npm ERR! node_modules/#soda/friendly-errors-webpack-plugin
npm ERR! #soda/friendly-errors-webpack-plugin#"^1.7.1" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! peer webpack#">=4.0.0" from #vue/preload-webpack-plugin#1.1.2
npm ERR! node_modules/#vue/preload-webpack-plugin
npm ERR! #vue/preload-webpack-plugin#"^1.1.0" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
npm ERR! 8 more (babel-loader, copy-webpack-plugin, css-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from #intervolga/optimize-cssnano-plugin#1.0.6
npm ERR! node_modules/#intervolga/optimize-cssnano-plugin
npm ERR! #intervolga/optimize-cssnano-plugin#"^1.0.5" from #vue/cli-service#4.5.11
npm ERR! node_modules/#vue/cli-service
npm ERR! dev #vue/cli-service#"~4.5.11" from the root project
npm ERR! 4 more (#vue/cli-plugin-babel, #vue/cli-plugin-eslint, ...)
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 C:\Users\Admin\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache\_logs\2021-03-06T19_52_21_583Z-debug.log
maybe you can try to npm i -g npm-check-updates then in the root folder try to execute ncu -u this will update your dependencies, devDependencies and peerDependencies
There was an issue with some dependencies.
I finally worked this out by creating a new project with vue-cli and copying that package.json there.
Edit:
You have to make sure that you use compatible versions of all dependencies. - The best way to do this is to generate a project with vue-cli to get compatible versions.
Long story short: don't mess with the dependencies

laravel 6 npm run dev failed

I recently start learning laravel and already did 2 project, but suddenly the NPM RUN DEV failed when i create new laravel 6 project.
I can still run my old project and also already tried rm -rf node_modules && npm cache clean --force && npm install.
here is the error in terms :
# dev C:\xampp\htdocs\SimplePOS
npm run development
# development C:\xampp\htdocs\SimplePOS
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
C:\Users\Eric\AppData\Roaming\npm\node_modules\cross-env\src\index.js:23
)
^
SyntaxError: Unexpected token )
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\Eric\AppData\Roaming\npm\node_modules\cross-env\src\bin\cross-env.js:3:18)
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "development"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\SimplePOS\npm-debug.log
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # dev script 'npm run development'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\SimplePOS\npm-debug.log
can someone help this newbie fix this problem?
I used package.json of another system.
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.20.1",
"sass-loader": "7.*",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10"
}
}