npm dependency issues and not sure how to resolve - npm

I really always have problems understanding the conflict issues in npm when installing/updating packages, currently i'm getting this error:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: frontend#1.0.0
npm ERR! Found: #angular/animations#15.1.4
npm ERR! node_modules/#angular/animations
npm ERR! #angular/animations#"^15.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/animations#"12.2.17" from #angular/platform-server#12.2.17
npm ERR! node_modules/#angular/platform-server
npm ERR! #angular/platform-server#"^12" 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.
What actually is it that it's telling me the problem is? It doesn't just say "this package is not compatible with this package, update to this" it just gives a cryptic message. It always seems when i try to update a package, another has an issue with it.
Here are the dependencies in package.json
"dependencies": {
"#angular/animations": "^15.1.4",
"#angular/cdk": "^15.1.4",
"#angular/common": "^15.1.4",
"#angular/compiler": "^15.1.4",
"#angular/core": "^15.1.4",
"#angular/flex-layout": "^8.0.0-beta.27",
"#angular/forms": "^15.1.4",
"#angular/http": "^7.2.16",
"#angular/material": "^15.1.4",
"#angular/platform-browser": "^15.1.4",
"#angular/platform-browser-dynamic": "^15.1.4",
"#angular/platform-server": "^12",
"#angular/router": "^15.1.4",
"#ng-bootstrap/ng-bootstrap": "^14.0.1",
"#scullyio/init": "^2.1.41",
"#scullyio/ng-lib": "^2.1.0",
"#scullyio/platform-server": "^2.1.0",
"#scullyio/scully": "^2.1.0",
"angular-calendar": "^0.31.0",
"angular-flatpickr": "^3.6.6",
"angular-linky": "^1.2.2",
"angular-password-strength-meter": "^5.0.1",
"angularx-flatpickr": "^7.0.0",
"date-fns": "^2.29.3",
"emoji-js": "^3.7.0",
"flatpickr": "^4.6.13",
"hammerjs": "^2.0.8",
"jquery": "^3.6.3",
"ng-recaptcha": "^11.0.0",
"ng-socket-io": "^0.2.4",
"ng2-file-upload": "^3.0.0",
"ng4-loader-bar": "^1.0.3",
"ngb-modal": "^2.0.3",
"ngx-emoji-picker": "0.1.6",
"ngx-file-drop": "^14.0.2",
"ngx-image-cropper": "^6.3.2",
"ngx-infinite-scroll": "^15.0.0",
"ngx-lightbox": "^3.0.0",
"ngx-toastr": "^16.0.2",
"ngx-ui-loader": "^13.0.0",
"rxjs": "^7.8.0",
"rxjs-compat": "^6.6.7",
"socket.io-client": "^4.6.0",
"tslib": "^2.5.0",
"ws": "^8.12.1",
"zone.js": "~0.12.0",
"zxcvbn3": "^0.1.1"
},
"devDependencies": {
"#angular-devkit/build-angular": "^15.1.5",
"#angular/cli": "^15.1.5",
"#angular/compiler-cli": "^15.1.4",
"#angular/language-service": "^15.1.4",
"#types/jasmine": "~4.3.1",
"#types/jasminewd2": "~2.0.10",
"#types/node": "~18.13.0",
"codelyzer": "^6.0.2",
"jasmine-core": "~4.5.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.1",
"karma-chrome-launcher": "~3.1.1",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"protractor": "~5.4.0",
"ts-node": "~10.9.1",
"tslint": "~5.20.1",
"typescript": "~4.9.5"
}

Related

Npm install try to install dependency not in package.json and prints error

On a project, I try to npm install for the first time. But it tries to install the dependency "js-xlsx" but i can't see it in package.json
Moreover, it prints error and can't install it, and install nothing else .
The error when npm install :
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! Error while executing:
npm ERR! C:\Program Files\Git\mingw64\bin\git.EXE ls-remote -h -t https://github.com/securedeveloper/js-xlsx.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/securedeveloper/js-xlsx.git/': Could not resolve host: github.com
npm ERR!
npm ERR! exited with error code: 128
Here is my package.json :
"dependencies": {
"axios": "^0.17.1",
"bootstrap": "^3.3.7",
"chart.js": "^2.4.0",
"create-react-class": "^15.6.3",
"fixed-data-table": "^0.6.3",
"jsx-to-string": "^1.0.2",
"lodash": "^4.17.5",
"moment": "^2.18.1",
"object-unfreeze": "^1.1.0",
"react": "^15.5.4",
"react-bootstrap": "^0.30.7",
"react-calendar-timeline": "^0.15.12",
"react-chartjs-2": "^2.1.0",
"react-data-export": "^0.4.2",
"react-dom": "^15.5.4",
"react-grid-layout": "^0.16.0",
"react-notification-system": "^0.2.16",
"react-redux": "^5.0.1",
"react-router": "^3.0.0",
"react-treebeard": "^2.0.3",
"redux": "^3.6.0",
"xhr": "^2.4.0"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"clean-webpack-plugin": "^0.1.19",
"css-entry-webpack-plugin": "^1.0.0-beta.4",
"css-loader": "^0.28.11",
"enzyme": "^3.3.0",
"enzyme-adapter-react-15": "^1.0.5",
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.6.1",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^23.1.0",
"jest-sonar-reporter": "^2.0.0",
"mini-css-extract-plugin": "^0.4.0",
"mock-local-storage": "^1.0.5",
"optimize-css-assets-webpack-plugin": "^4.0.2",
"react-css-modules": "^4.1.0",
"react-datetime": "^2.8.9",
"react-test-renderer": "^15.6.2",
"style-loader": "^0.16.1",
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.4",
"webpack-merge": "^4.1.2"
},
Why does it try to install it ? Does it need it for another dependency ?
How can i solve this ?
So, I needed to configure not only the proxy of npm, but git also :
git config --global http.proxy http://proxyUsername:proxyPassword#proxy.server.com:port
git config --global https.proxy http://proxyUsername:proxyPassword#proxy.server.com:port
git config http.sslVerify false

#angular-devkit/build-angular dependency issue while upgrading from Angular 11.0.5 to 12.2.16

I am try to upgrade an Angular project from Angular v11 using ng update and got peer dependency error. I referred How do I read npm "conflicting peer dependency" error messages? to understand about the peer dependency errors, but it still does not help in this case.
. Here's the output of ng update:
We analyzed your package.json, there are some packages to update:
Name Version Command to update
--------------------------------------------------------------------------------
#angular/cli 11.2.18 -> 12.2.9 ng update #angular/cli#12
#angular/core 11.2.14 -> 12.2.9 ng update #angular/core#12
There might be additional packages which don't provide 'ng update' capabilities that are outdated.
You can update the additional packages by running the update command of your package manager.
Upon running ng update #angular/cli#12 I get the below error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: #angular-devkit/build-angular#0.1100.7
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^12.2.16" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev #angular-devkit/build-angular#"^12.2.16" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/compiler-cli#12.2.16
npm ERR! node_modules/#angular/compiler-cli
npm ERR! peer #angular/compiler-cli#"^12.0.0" from #angular-devkit/build-angular#12.2.16
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"^12.2.16" 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!
Here's my package.json
Before running ng update
{
"name": "my-first-app",
"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": {
"#angular/animations": "^11.0.5",
"#angular/common": "^11.0.5",
"#angular/compiler": "^11.0.5",
"#angular/core": "^11.0.5",
"#angular/forms": "^11.0.5",
"#angular/platform-browser": "^11.0.5",
"#angular/platform-browser-dynamic": "^11.0.5",
"#angular/router": "^11.0.5",
"bootstrap": "3.3.7",
"rxjs": "^6.6.3",
"rxjs-compat": "^6.0.0",
"tslib": "^2.0.3",
"zone.js": "^0.10.3"
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.1100.4",
"#angular/cli": "^11.0.4",
"#angular/compiler-cli": "^11.0.5",
"#types/jasmine": "~3.6.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.19.9",
"codelyzer": "^6.0.1",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.0.2"
}
}
After running ng update
{
"name": "my-first-app",
"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": {
"#angular/animations": "^12.2.16",
"#angular/common": "^12.2.16",
"#angular/compiler": "^12.2.16",
"#angular/core": "^12.2.16",
"#angular/forms": "^12.2.16",
"#angular/platform-browser": "^12.2.16",
"#angular/platform-browser-dynamic": "^12.2.16",
"#angular/router": "^12.2.16",
"bootstrap": "3.3.7",
"rxjs": "^6.6.3",
"rxjs-compat": "^6.0.0",
"tslib": "^2.0.3",
"zone.js": "^0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "^12.2.16",
"#angular/cli": "^12.2.16",
"#angular/compiler-cli": "^12.2.16",
"#types/jasmine": "~3.6.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.19.9",
"codelyzer": "^6.0.1",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.16",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.3.5"
}
}
I checked the code https://github.com/angular/angular-cli/blob/12.2.x/packages/angular_devkit/build_angular/package.json
"peerDependencies": {
"#angular/compiler-cli": "^12.0.0",
As far as I know, ^12.0.0 should not cause a problem with 12.2.16 as it is in the same major version, so why am I still getting peer dependency error?
This is happening because of a Semver bug in npm. You should be able to fix it by adding --force to your upgrade command or use yarn instead.
ref. GitHub Issue
(I too had the exact issue, this worked fine for me)

How to update all npm packages in a medium/advanced project?

I'm trying to update Angular from version 11 to 12 and I'm following this tutorial: https://update.angular.io/?l=3&v=11.0-12.0
When I launch this command ng update #angular/core#12 #angular/cli#12 on the terminal I have this message:
✔ Package successfully installed.
Using package manager: 'npm'
Collecting installed dependencies...
Found 0 dependencies.
Package '#angular/core' is not a dependency.
I can't resolve in noway, nothing change in my package.json. I'm tryng to update with npm i #angular/core#12 npi i #angular/cli#12, it works but when I'm going to install all packages in my package.json I have a lot of problem with dependency like this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: poc-architecture-angular#0.0.0
npm ERR! Found: #angular/common#12.1.5
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"~12.1.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#">=11.0.0 <12.0.0" from #ng-select/ng-select#6.1.0
npm ERR! node_modules/#ng-select/ng-select
npm ERR! #ng-select/ng-select#"^6.1.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!
npm ERR! See /home/andrea/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/andrea/.npm/_logs/2021-09-06T13_14_09_645Z-debug.log
I would to update Angular and after that all the outdated packages but I can't. Is something wrong? I tried also with npx npm-check-updates -u but with same dependencies issues.
This is my package.json:
{
"name": "poc-architecture-angular",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --port 4200",
"build": "NODE_ENV=production ng build --prod",
"build:dev": "NODE_ENV=production ng build --source-map=true --prod",
"build:local": "ng build --watch --output-path /usr/share/nginx/html && tar -zcvf archive.tar.gz dist/prod/*",
"test": "ng test",
"test:coverage": "ng test --no-watch --code-coverage --browsers ChromeHeadlessNoSandbox",
"lint": "ng lint",
"e2e": "ng e2e",
"stylelint": "stylelint --fix \"src/**/*.scss\" --config .stylelintrc.json",
"stylelint:diff": "stylelint \"src/**/*scss\" --config .stylelintrc.json",
"format": "prettier --write \"src/app/**/*.{ts,html,scss}\"",
"format:diff": "prettier --list-different \"src/app/**/*.{ts,html,scss}\"",
"analize": "ng build --prod --stats-json && node_modules/.bin/webpack --json | webpack-bundle-analyzer ./dist/poc-architecture-angular/stats.json",
"compodoc": "./node_modules/.bin/compodoc -p ./tsconfig.base.json -w -s --language=it-IT -r 8081",
"docs:json": "compodoc -p ./tsconfig.json -e json -d .",
"storybook": "npm run docs:json && start-storybook -p 9001 --quiet -c .storybook",
"build-storybook": "npm run docs:json && build-storybook",
"cypress:open-local": "cypress open --config baseUrl=http://localhost:4200",
"cypress:run-local": "cypress run --config baseUrl=http://localhost:4200",
"sonar": "sonar-scanner"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/app/**/*.{ts,html,scss}": [
"prettier --write"
]
},
"exports": {
"./": "./*"
},
"private": true,
"dependencies": {
"#angular/animations": "~12.1.4",
"#angular/cdk": "^11.2.12",
"#angular/common": "~12.1.4",
"#angular/compiler": "^12.1.4",
"#angular/core": "^12.1.5",
"#angular/forms": "~12.1.4",
"#angular/material": "^11.2.12",
"#angular/platform-browser": "~12.1.4",
"#angular/platform-browser-dynamic": "~12.1.4",
"#angular/router": "~12.1.4",
"#fullcalendar/angular": "^5.5.0",
"#fullcalendar/core": "^5.5.1",
"#fullcalendar/daygrid": "^5.5.0",
"#fullcalendar/interaction": "^5.5.0",
"#ng-select/ng-select": "^6.1.0",
"#ngrx/effects": "^11.1.1",
"#ngrx/router-store": "^11.1.1",
"#ngrx/store": "^11.1.1",
"#ngrx/store-devtools": "^11.1.1",
"#storybook/preset-scss": "^1.0.3",
"chart.js": "^2.9.3",
"filesize": "^6.1.0",
"hammerjs": "^2.0.8",
"i": "^0.3.6",
"lodash-es": "^4.17.20",
"luxon": "^1.26.0",
"moment": "^2.29.1",
"ng2-date-picker": "^11.0.0",
"ng2-pdf-viewer": "^6.4.1",
"ngrx-store-localstorage": "^11.0.0",
"ngx-cookie-service": "^11.0.2",
"ngx-infinite-scroll": "^10.0.1",
"ngx-webstorage": "^7.0.1",
"npm": "^7.22.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.3"
},
"devDependencies": {
"#angular-devkit/build-angular": "^12.2.2",
"#angular/cli": "^12.2.4",
"#angular/compiler-cli": "^12.1.4",
"#babel/core": "^7.13.10",
"#compodoc/compodoc": "^1.1.11",
"#ngrx/schematics": "^11.1.1",
"#storybook/addon-actions": "^6.1.21",
"#storybook/addon-backgrounds": "^6.1.21",
"#storybook/addon-docs": "^6.1.21",
"#storybook/addon-knobs": "^6.1.21",
"#storybook/addon-links": "^6.1.21",
"#storybook/addon-storysource": "^6.1.21",
"#storybook/addon-viewport": "^6.1.21",
"#storybook/angular": "^6.1.21",
"#types/faker": "^5.1.7",
"#types/fs-extra": "^5.0.2",
"#types/jasmine": "^3.5.14",
"#types/jasminewd2": "~2.0.3",
"#types/lodash": "^4.14.168",
"#types/luxon": "^1.26.3",
"#types/node": "^12.12.54",
"autoprefixer": "^10.0.1",
"babel-loader": "^8.2.2",
"codelyzer": "^6.0.0",
"css-loader": "^4.3.0",
"cypress": "^7.6.0",
"faker": "^5.1.0",
"husky": "^4.3.8",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"lint-staged": "^10.5.4",
"ng-packagr": "^12.2.1",
"postcss": "^8.1.0",
"postcss-loader": "^4.0.2",
"prettier": "^2.2.1",
"protractor": "~7.0.0",
"puppeteer": "~8.0.0",
"sass-loader": "^10.0.2",
"sonarqube-scanner": "2.8.0",
"style-loader": "^1.2.1",
"stylelint": "^13.6.1",
"stylelint-config-sass-guidelines": "^7.0.0",
"stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.18.0",
"tailwindcss": "^2.2.6",
"tailwindcss-multi-column": "^1.0.2",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "~4.3.5",
"webpack-bundle-analyzer": "^3.9.0",
"webpack-cli": "^4.5.0"
}
}
Navigate to the root directory of your project and ensure it contains a package.json file:
cd /path/to/project
In your project root directory, run the update command:
npm update
To test the update, run the outdated command. There should not be any output.
npm outdated
Update globally-installed packages. If you are using npm version 2.6.0 or earlier, run this command to update all outdated global packages:
npm install npm#latest -g
However, please consider upgrading to the latest version of npm.

vue.js - I'm getting an error when running my project

sudo npm run serve
> frontend#1.0.0 serve /home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda
> vue-cli-service serve
INFO Starting development server...
12% building 20/21 modules 1 active ...rojetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/webpack/buildin/global.js/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/webpack/lib/Dependency.js:226
throw new Error(
^
Error: module property was removed from Dependency (use compilation.moduleGraph.updateModule(dependency, module) instead)
at ProvidedDependency.set (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/webpack/lib/Dependency.js:226:9)
at iterationDependencies (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/webpack/lib/Compilation.js:940:21)
at factory.create (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/webpack/lib/Compilation.js:950:8)
at factory (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/webpack/lib/NormalModuleFactory.js:409:6)
at hooks.afterResolve.callAsync (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/webpack/lib/NormalModuleFactory.js:155:13)
at _fn0 (eval at create (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
at fileExistsWithCase (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:158:9)
at that.fileExistsWithCase (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:113:7)
at that.fileExistsWithCase (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:113:7)
at CaseSensitivePathsPlugin.fileExistsWithCase (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:83:5)
at that.getFilenamesInDir (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:106:10)
at CaseSensitivePathsPlugin.getFilenamesInDir (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:51:5)
at CaseSensitivePathsPlugin.fileExistsWithCase (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:89:8)
at that.getFilenamesInDir (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:106:10)
at Array.fs.readdir (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/case-sensitive-paths-webpack-plugin/index.js:67:5)
at Storage.finished (/home/shinier01/Projetos/EstudanaIrlanda/frontend-estudenairlanda/node_modules/#vue/cli-service/node_modules/enhanced-
resolve/lib/CachedInputFileSystem.js:55:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend#1.0.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend#1.0.0 serve 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/shinier01/.npm/_logs/2020-11-10T18_21_27_165Z-debug.log
I tried to uninstall npm, vue and node, I deleted the .json files, but somehow nothing solves, and I always have this error when executing my command.
but this project is already running normally before, and now I gave an npm install and it updated the packages, but even if I give a roolbakc, or delete and install it again, nothing resolves.
{
"name": "frontend",
"version": "1.0.0",
"description": "A Vue.js project",
"author": ".....",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"#vue/cli": "^4.5.8",
"#vue/cli-service": "^4.5.8",
"axios": "^0.20.0",
"buefy": "^0.9.3",
"firebase": "^7.22.0",
"vue": "^2.6.12",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^6.3.0",
"css-loader": "^5.0.1",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^4.1.1",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^5.4.0",
"webpack-bundle-analyzer": "^4.1.0",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
can someone help me solve this error, please?
I faced the same problem and found a solution.
In my case application started using V5 of webpack and it was built on V4. You can run: npm i -D webpack#^4.0.0 to reverse it to V4 and it should fix it.
Special thanks to Mark:
https://forum.layer0.co/t/error-module-property-was-removed-from-dependency/208

'npm ERR! Could not install from "android" as it does not contain a package.json file.\n' +

I couldn't execute below command and having error as per subject title .pls help
ionic cordova platform add android
ionic cordova add android
ionic cordova prepare android
S C:\Users\jj\Desktop\bento academy\Bentograms> ionic cordova platform add android
cordova.cmd platform add android Error: npm: Command failed with exit code 1 Error output: npm ERR! code ENOLOCAL npm ERR! Could not
install from "android" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\jj\AppData\Roaming\npm-cache_logs\2020-07-31T14_53_29_466Z-debug.log
at ChildProcess.whenDone (C:\Users\jj\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:135:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\jj\AppData\Roaming\npm\node_modules\cordova\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) { stderr: 'npm ERR! code
ENOLOCAL\n' +
'npm ERR! Could not install from "android" as it does not contain a package.json file.\n' +
'\n' +
'npm ERR! A complete log of this run can be found in:\n' +
'npm ERR! C:\Users\jj\AppData\Roaming\npm-cache\_logs\2020-07-31T14_53_29_466Z-debug.log\n',
code: 1 } [ERROR] An error occurred while running subprocess cordova.
PS C:\Users\jj\Desktop\bento academy\Bentograms> ionic cordova prepare android
? Platform android is not installed! Would you like to install it? Yes
cordova.cmd platform add android --save
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "android" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jj\AppData\Roaming\npm-cache_logs\2020-07-31T14_32_53_529Z-debug.log
at ChildProcess.whenDone (C:\Users\jj\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:135:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (C:\Users\jj\AppData\Roaming\npm\node_modules\cordova\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
stderr: 'npm ERR! code ENOLOCAL\n' +
'npm ERR! Could not install from "android" as it does not contain a package.json file.\n' +
'\n' +
'npm ERR! A complete log of this run can be found in:\n' +
'npm ERR! C:\Users\jj\AppData\Roaming\npm-cache\_logs\2020-07-31T14_32_53_529Z-debug.log\n',
Here is my package.json file
{
"name": "Bentograms",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "~9.1.6",
"#angular/core": "~9.1.6",
"#angular/fire": "^6.0.2",
"#angular/forms": "~9.1.6",
"#angular/platform-browser": "~9.1.6",
"#angular/platform-browser-dynamic": "~9.1.6",
"#angular/router": "~9.1.6",
"#capacitor/android": "^2.3.0",
"#capacitor/core": "2.3.0",
"#ionic-native/camera": "^5.27.0",
"#ionic-native/core": "^5.0.7",
"#ionic-native/facebook": "^5.27.0",
"#ionic-native/file": "^5.27.0",
"#ionic-native/file-path": "^5.27.0",
"#ionic-native/google-plus": "^5.27.0",
"#ionic-native/ionic-webview": "^5.27.0",
"#ionic-native/native-storage": "^5.22.0-beta-1",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic/angular": "^5.0.0",
"#ionic/storage": "^2.3.0",
"cordova-browser": "^6.0.0",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-facebook4": "^6.4.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-googleplus": "^8.5.0",
"cordova-plugin-nativestorage": "^2.3.2",
"exif-js": "^2.3.0",
"firebase": "^7.16.0",
"rxjs": "~6.5.1",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.901.5",
"#angular/cli": "~9.1.5",
"#angular/compiler": "~9.1.6",
"#angular/compiler-cli": "~9.1.6",
"#angular/language-service": "~9.1.6",
"#capacitor/cli": "2.3.0",
"#ionic/angular-toolkit": "^2.1.1",
"#types/jasmine": "~3.5.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.871006065561-1u6n3q4iav5486cjc1kg3djl7410p873"
},
"cordova-plugin-nativestorage": {},
"cordova-plugin-camera": {},
"cordova-plugin-file": {}
}
}
}
Delete the "android" folder in the root directory.
The run the command again:
ionic cordova platform add android