Related
I am working with a the Airframe React template and the steps are pretty straightforward: Unzip and run npm install from the project directory. The problem is that I get the following error when I run npm install:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: airframe-dashboard#0.1.0
npm ERR! Found: eslint#6.8.0
npm ERR! node_modules/eslint
npm ERR! dev eslint#"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint#"^4.19.1 || ^5.3.0" from eslint-config-airbnb#17.1.1
npm ERR! node_modules/eslint-config-airbnb
npm ERR! dev eslint-config-airbnb#"^17.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 C:\Users\leord\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\leord\AppData\Local\npm-cache\_logs\2022-06-15T05_07_36_689Z-debug-0.log
I tried using --legacy-peer-deps, or changing the entry "devDependencies.eslint" to "*" and to "^5.3.0" in the package.json file, but now it runs with the following error:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\leord\AppData\Local\npm-cache\_logs\2022-06-15T05_11_22_330Z-debug-0.log
I also tried reinstalling Node and npm. What I find weird is that I haven't changed anything in the project and I can't run it.
I have tried it from both Windows 11 and WSL2. My IDE is WebStorm and everything is up to date.
The complete (original) package.json file has the following dependencies:
{
"name": "airframe-dashboard",
"version": "0.1.0",
"description": "Seed project for flexible light React/Bootstrap 4 dashboards.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run start:dev",
"build:dev": "node ./build/cli-tools.js --clear dist --create dist && webpack --config ./build/webpack.config.client.dev.js",
"build:prod": "node ./build/cli-tools.js --clear dist --create dist && webpack --config ./build/webpack.config.client.prod.js",
"start:dev": "node ./build/cli-tools.js --clear dist --create dist && webpack-dev-server --config ./build/webpack.config.client.dev.js",
"start:prod": "node ./build/cli-tools.js --clear dist --create dist && webpack-dev-server --config ./build/webpack.config.client.prod.js"
},
"author": "Webkom",
"license": "ISC",
"devDependencies": {
"#babel/cli": "^7.4.4",
"#babel/core": "^7.4.5",
"#babel/plugin-proposal-class-properties": "^7.4.4",
"#babel/plugin-syntax-dynamic-import": "^7.2.0",
"#babel/preset-env": "^7.4.5",
"#babel/preset-react": "^7.0.0",
"autoprefixer": "^9.6.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.6",
"babel-plugin-universal-import": "^4.0.0",
"circular-dependency-plugin": "^5.0.2",
"commander": "^2.20.0",
"css-loader": "^3.1.0",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.13.0",
"extract-css-chunks-webpack-plugin": "^4.5.2",
"file-loader": "^4.0.0",
"html-webpack-plugin": "^3.2.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.12.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"postcss-loader": "^3.0.0",
"raw-loader": "^3.0.0",
"rimraf": "^2.6.3",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.3.0",
"webpack": "^4.33.0",
"webpack-cli": "^3.3.4",
"webpack-dev-server": "^3.7.1"
},
"dependencies": {
"#babel/polyfill": "^7.4.4",
"#owczar/dashboard-style--airframe": "^0.1.13",
"ag-grid-community": "^21.0.1",
"ag-grid-react": "^21.0.1",
"bootstrap": "^4.3.1",
"faker": "^4.1.0",
"font-awesome": "^4.7.0",
"holderjs": "^2.9.6",
"lodash": "^4.17.11",
"moment": "^2.24.0",
"node-fetch": "^2.6.0",
"numeral": "^2.0.6",
"prop-types": "^15.7.2",
"query-string": "^6.7.0",
"rc-slider": "^8.6.13",
"react": "^16.8.6",
"react-beautiful-dnd": "^11.0.4",
"react-big-calendar": "^0.22.0",
"react-bootstrap-table-next": "^3.1.4",
"react-bootstrap-table2-editor": "^1.2.4",
"react-bootstrap-table2-filter": "^1.1.9",
"react-bootstrap-table2-paginator": "^2.0.6",
"react-bootstrap-table2-toolkit": "^2.0.1",
"react-bootstrap-typeahead": "^4.0.0-alpha.9",
"react-datepicker": "^2.7.0",
"react-dom": "^16.8.6",
"react-dropzone": "^10.1.5",
"react-grid-layout": "^0.16.6",
"react-helmet": "^5.2.1",
"react-hot-loader": "^4.11.0",
"react-image-crop": "^8.0.2",
"react-quill": "^1.3.3",
"react-responsive": "^7.0.0",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"react-text-mask": "^5.4.3",
"react-toastify": "^5.2.1",
"react-toggle": "^4.0.2",
"react-universal-component": "^4.0.0",
"reactstrap": "^8.0.0",
"recharts": "^1.6.2",
"text-mask-addons": "^3.8.0",
"uuid": "^3.3.2",
"webpack-cli": "^3.1.0",
"webpack-flush-chunks": "^2.0.3"
}
}
How can I resolve the dependency conflict?
UPDATE:
Turns out I did not have Git installed. After installing it, trying npm install in the project's root folder gives me the following error:
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/Marak/faker.js.git
npm ERR! Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
npm ERR! git#github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\leord\AppData\Local\npm-cache\_logs\2022-06-15T07_03_08_129Z-debug-0.log
Why do I need access to that git repo?
Try using --force.
What is ur node/npm version?
I hit the below error on container when i deploy the app on Open shift.
status of container is Crash Loop Back-off
Local env works fine with no errors.
I made sure angular package versions are aligned to get the build successful.
> ng serve
sh: ng: command not found
npm info lifecycle dashboard#0.0.0~start: Failed to exec start script
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! dashboard#0.0.0 start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the dashboard#0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 122ms
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2020-04-10T15_14_11_050Z-debug.log
My package.json looks like below
"name": "dashboard",
"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": "~8.2.14",
"#angular/cdk": "^8.2.3",
"#angular/common": "^8.2.14",
"#angular/compiler": "^8.2.14",
"#angular/core": "^8.2.14",
"#angular/forms": "^8.2.14",
"#angular/material": "7.3.2",
"#angular/platform-browser": "^8.2.14",
"#angular/platform-browser-dynamic": "^8.2.14",
"#angular/router": "^8.2.14",
"#swimlane/ngx-charts": "^13.0.2",
"chart.js": "^2.9.3",
"ng2-charts": "^2.3.0",
"rxjs": "~6.4.0",
"sessionstorage": "^0.1.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.803.26",
"#angular/cli": "^8.3.26",
"#angular/compiler-cli": "~8.2.13",
"#angular/language-service": "~8.2.13",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "^2.0.8",
"#types/node": "^8.10.59",
"codelyzer": "^5.2.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.1",
"protractor": "^5.4.3",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
}
}
Any thoughts or help is appreciated.
Just add npx before ng serve like this npx ng serve
If you have installed the dependencies locally and need to refer those packages instead of global. use npx before the the command eg: npx ng serve refers to the locally installed package. ng serve refers to the global package.
npm version 5.2+
my heroku build is failing. I am trying to build an Angular 4 application on Heroku but it won't let me. I have a feeling it is missing a package.json dependency but I am not sure.
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 8.x...
Downloading and installing node 8.9.3...
Using default npm version: 5.5.1
-----> Restoring cache
Skipping cache restore (not-found)
-----> Building dependencies
Installing node modules (package.json + package-lock)
> n5-complete-guide#0.0.0 preinstall /tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add
> npm install -g http-server
/tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add/.heroku/node/bin/http-server -> /tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add/.heroku/node/lib/node_modules/http-server/bin/http-server
/tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add/.heroku/node/bin/hs -> /tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add/.heroku/node/lib/node_modules/http-server/bin/http-server
+ http-server#0.10.0
added 23 packages in 1.212s
> node#9.2.0 preinstall /tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add/node_modules/node
> node installArchSpecificPackage
+ node-linux-x64#9.2.0
added 1 package in 1.676s
> n5-complete-guide#0.0.0 postinstall /tmp/build_245bb93639fea477473780ef82795ada/SPA-Front-End-d028559f87c3e58d7bd2c6da70d4ffb0e3e44add
> ng build --prod
sh: 1: ng: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! n5-complete-guide#0.0.0 postinstall: `ng build --prod`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the n5-complete-guide#0.0.0 postinstall 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! /app/.npm/_logs/2017-12-13T01_22_28_985Z-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- Node version not specified in package.json
https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
I do not know why it is failing but I really want it to work, any help is appreciated. If you need more specific details, please let me know!
My JSON package:
{
"name": "n5-complete-guide",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"_heroku": "https://www.angularonrails.com/deploy-rails-application-angular-cli-webpack-front-end/",
"start": "http-server dist/",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor",
"preinstall": "npm install -g http-server",
"postinstall": "ng build --prod"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.0.0",
"#angular/common": "^5.0.0",
"#angular/compiler": "^5.0.0",
"#angular/core": "^5.0.0",
"#angular/forms": "^5.0.0",
"#angular/http": "^5.0.0",
"#angular/platform-browser": "^5.0.0",
"#angular/platform-browser-dynamic": "^5.0.0",
"#angular/router": "^5.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"express": "^4.16.2",
"ng": "0.0.0-rc6",
"node": "^9.2.0",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/cli": "1.5.0",
"#angular/compiler-cli": "^5.0.0",
"#angular/language-service": "^5.0.0",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
Move #angular/cli and #angular/compiler-cli from “devDependencies” to “dependencies”.
Here is my package.json :
{
"name": "mean-app",
"version": "0.0.0",
"license": "MIT",
"engines": {
"node": "6.11.3",
"npm": "3.10.10"
},
"scripts": {
"ng": "ng",
"start": "node server.js",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"heroku-postbuild": "ng build"
},
"private": true,
"dependencies": {
"#angular/animations": "^4.2.4",
"#angular/cli": "1.4.9",
"#angular/common": "^4.2.4",
"#angular/compiler": "^4.2.4",
"#angular/compiler-cli": "^4.2.4",
"#angular/core": "^4.2.4",
"#angular/forms": "^4.2.4",
"#angular/http": "^4.2.4",
"#angular/platform-browser": "^4.2.4",
"#angular/platform-browser-dynamic": "^4.2.4",
"#angular/router": "^4.2.4",
"angular2-toaster": "^4.0.1",
"axios": "^0.17.0",
"body-parser": "^1.18.2",
"bootstrap": "^4.0.0-beta.2",
"core-js": "^2.4.1",
"cors": "^2.8.4",
"express": "^4.16.2",
"jquery": "^3.2.1",
"mongoose": "^4.12.4",
"ngx-bootstrap": "^1.9.3",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/language-service": "^4.2.4",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/jquery": "^3.2.15",
"#types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3"
}
}
It fails because there is no ng command available. It's provided by #angular/cli, if moving it to required dependencies and executing local binary doesn't work, then try to change your preinstall script to:
"preinstall": "npm i -g http-server && npm i -g #angular/cli",
In postinstall, you are using ng executable supposing it's installed globally.
Since ng is also one of your dependencies, you could change it to
"postinstall": "./node_modules/.bin/ng build --prod"
Beacause #angular/cli is not installed on deployed machine using ng build in script wont work.
Do this
"scripts": {
...
"build:prod": "ng build --prod",
"heroku-postbuild": "npm run build:prod"
},
Things to note. use heroku-postbuild instead of postinstall. And running a npm script which uses local package (ng in this case) works. But directly running ng build --prod in npm script wont run.
When running npm install on this package.json
{
"author": ", Inc.",
"name": "-angular2-template",
"version": "0.2.0",
"description": "Angular 2 Project Template. Webpack, ES6, Sass, Karma.",
"bugs": {
"url": "https://dev..net//-angular-template/issues"
},
"repository": {
"type": "git",
"url": "git#dev..net:/-angular-template.git"
},
"scripts": {
"start": "concurrently -k -r \"npm run webpack:w\" \"npm run sass:w\" \"npm run lite\"",
"build": "NODE_ENV='production' npm run webpack:b && npm run sass:b",
"webpack:b": "webpack",
"webpack:w": "webpack -w",
"sass": "node-sass --source-map true src/scss/index.scss build/styles.css",
"sass:b": "node-sass --output-style compressed src/scss/index.scss build/styles.css",
"sass:w": "npm run sass; node-sass --source-map true -w src/scss/index.scss build/styles.css",
"lite": "lite-server",
"postinstall": "typings install",
"typings": "typings"
},
"dependencies": {
"#angular/common": "2.0.0-rc.4",
"#angular/compiler": "2.0.0-rc.4",
"#angular/core": "2.0.0-rc.4",
"#angular/platform-browser": "2.0.0-rc.4",
"#angular/platform-browser-dynamic": "2.0.0-rc.4",
"#angular/forms": "^0.3.0",
"#angular/http": "2.0.0-rc.4",
"#angular/router": "3.0.0-beta.1",
"#angular/upgrade": "2.0.0-rc.4",
"angular2-cookie": "^1.2.2",
"bootstrap": "^3.3.7",
"firebase": "^3.3.0",
"js-data": "^3.0.0-rc.2",
"js-data-http": "^3.0.0-beta.8",
"lodash": "^4.6.1",
"ng2-bootstrap": "^1.0.24",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"tslint": "^3.13.0",
"zone.js": "^0.6.12"
},
"devDependencies": {
"angular2-template-loader": "^0.4.0",
"autoprefixer": "^6.3.4",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.9.0",
"browser-sync-webpack-plugin": "^1.1.0",
"codelyzer": "0.0.25",
"concurrently": "^2.0.0",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.15.0",
"jasmine-core": "^2.4.1",
"karma": "^0.13.22",
"karma-jasmine": "^0.3.8",
"karma-phantomjs-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.7.0",
"lite-server": "^2.2.0",
"node-sass": "^3.4.2",
"null-loader": "^0.1.1",
"phantomjs-prebuilt": "^2.1.7",
"postcss": "^5.0.21",
"postcss-loader": "^0.9.1",
"raw-loader": "^0.5.1",
"sass-loader": "^4.0.0",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.1",
"tslint-eslint-rules": "^1.3.0",
"tslint-loader": "^2.1.5",
"typescript": "^1.8.10",
"typings": "^1.0.4",
"webpack": "^1.13.0"
}
}
I get the following errors..
typings WARN deprecated 8/18/2016: "registry:dt/node#4.0.0+20160509154515" is deprecated (updated, replaced or removed)
typings WARN deprecated 7/25/2016: "registry:dt/core-js#0.0.0+20160317120654" is deprecated (updated, replaced or removed)
typings WARN deprecated 6/21/2016: "registry:dt/jasmine#2.2.0+20160505161446" is deprecated (updated, replaced or removed)
typings WARN deprecated 7/24/2016: "registry:dt/webpack#1.12.9+20160523035535" is deprecated (updated, replaced or removed)
├── core-js (global)
├── jasmine (global)
├── moment (global)
├── node (global)
├── source-map (global)
├── uglify-js (global)
└── webpack (global)
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\angularfire2 requires #angular/common#'^2.0.0-rc.5' but will load
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\#angular\common,
npm WARN unmet dependency which is version 2.0.0-rc.4
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\angularfire2 requires #angular/compiler#'^2.0.0-rc.5' but will load
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\#angular\compiler,
npm WARN unmet dependency which is version 2.0.0-rc.4
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\angularfire2 requires #angular/core#'^2.0.0-rc.5' but will load
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\#angular\core,
npm WARN unmet dependency which is version 2.0.0-rc.4
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\angularfire2 requires #angular/platform-browser#'^2.0.0-rc.5' but will load
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\#angular\platform-browser,
npm WARN unmet dependency which is version 2.0.0-rc.4
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\angularfire2 requires #angular/platform-browser-dynamic#'^2.0.0-rc.5' but will load
npm WARN unmet dependency C:\Users\Modal\ng2-crm-revamp\node_modules\#angular\platform-browser-dynamic,
npm WARN unmet dependency which is version 2.0.0-rc.4
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package #angular/common#2.0.0-rc.4 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer #angular/platform-browser#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/platform-browser-dynamic#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/forms#0.3.0 wants #angular/common#^2.0.0-rc.5
npm ERR! peerinvalid Peer #angular/router#3.0.0-beta.1 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer ng2-bootstrap#1.0.24 wants #angular/common#2.0.0-rc.4
I've tried a fresh npm install. I've tried running npm install npm -g and I've tried clearing out node_modulesboth globally and in appdata. I've Googled around and found next to nothing. Perhaps it's because my Googling is bad. Or perhaps because there's actually nothing to find. I'm not sure. But I'm flustered and this feels like the time to make my first Stackoverflow post, although it definitely feels more like a plea than anything.
It's clearly telling you what's wrong. You are installing some angular2 with the latest release and some from previous version and that's why you are getting good this error. Try to install all the latest or only previous version.
Install Latest version nodejs (nodejs.org). try again. npm install
I start npm but see error , i don't know fix. please help me
"D:\PhpStorm 2016.1.2\bin\runnerw.exe" D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js run-script start
> pickuphub#0.3.0 start E:\phong.pham\Developer\phpDev\pickuphub.net
> npm run start:tunnel
> pickuphub#0.3.0 start:tunnel E:\phong.pham\Developer\phpDev\pickuphub.net
> cross-env NODE_ENV=development node internals/server
CarteBlanche started at /carte-blanche
Server started ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3000
LAN: http://192.168.0.107:3000
-----------------------------------
Press CTRL-C to stop
Error:
Uncaught Exception...
TypeError: d.getWarnings is not a function
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:594:21
at Array.forEach (native)
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:593:22
at Array.forEach (native)
at Compilation.reportDependencyWarnings (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:592:9)
at Compilation.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:483:8)
at Array.forEach (native)
at Compilation.seal (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compilation.js:482:15)
at Compiler.<anonymous> (E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\lib\Compiler.js:431:15)
at E:\phong.pham\Developer\phpDev\pickuphub.net\node_modules\webpack\node_modules\tapable\lib\Tapable.js:152:11
Uncaught Exception...
undefined
Error:
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "C:\Users\phamv\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "start:tunnel"
npm ERR! node v4.4.5
npm ERR! npm v3.9.6
npm ERR! code ELIFECYCLE
npm ERR! pickuphub#0.3.0 start:tunnel: cross-env NODE_ENV=development node internals/server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pickuphub#0.3.0 start:tunnel script 'cross-env NODE_ENV=development node internals/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 pickuphub 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 internals/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pickuphub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pickuphub
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "start"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! pickuphub#0.3.0 start: `npm run start:tunnel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pickuphub#0.3.0 start script 'npm run start:tunnel'.
npm ERR! This is most likely a problem with the pickuphub package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run start:tunnel
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pickuphub
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls pickuphub
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\phong.pham\Developer\phpDev\pickuphub.net\npm-debug.log
Process finished with exit code 1
i begin learn reactjs and using nodejs . please help me
package.json
{
"name": "pickuphub",
"version": "0.3.0",
"private": true,
"dllPlugin": {
"path": "node_modules/pickuphub-dlls",
"exclude": [
"sanitize.css"
],
"include": [
"babel-polyfill",
"core-js",
"eventsource-polyfill",
"lodash"
]
},
"dependencies": {
"angle-input": "git+https://github.com/hosmelq/angle-input.git",
"babel-polyfill": "^6.9.1",
"classnames": "^2.2.5",
"date-fns": "^1.3.0",
"draft-js": "^0.7.0",
"elemental": "^0.5.14",
"history": "^3.0.0",
"humps": "^1.1.0",
"immutable": "^3.8.1",
"is-absolute-url": "^2.0.0",
"lodash-es": "^4.13.1",
"moment": "^2.13.0",
"normalizr": "^2.1.0",
"query-string": "^4.2.2",
"raven-js": "^3.1.0",
"rc-switch": "^1.4.2",
"rc-tooltip": "^3.3.5",
"react": "^15.1.0",
"react-addons-css-transition-group": "^15.1.0",
"react-addons-shallow-compare": "^15.1.0",
"react-dom": "^15.1.0",
"react-dropzone": "^3.5.1",
"react-highlighter": "^0.3.2",
"react-immutable-proptypes": "^1.7.1",
"react-masonry-component": "^4.0.4",
"react-modal": "^1.3.0",
"react-nl2br": "^0.1.1",
"react-redux": "^4.4.5",
"react-relay": "^0.9.0",
"react-router": "^2.5.0",
"react-router-redux": "^4.0.5",
"react-router-relay": "^0.13.3",
"react-router-scroll": "^0.2.0",
"react-select": "^1.0.0-beta9",
"react-slick": "^0.12.2",
"react-url": "^1.0.0",
"reactable": "^0.13.2",
"recompose": "^0.20.0",
"recompose-relay": "^0.3.0",
"redux": "^3.5.2",
"redux-api-middleware": "^1.0.2",
"redux-form": "^5.2.5",
"redux-immutable": "^3.0.6",
"redux-saga": "^0.10.5",
"reselect": "^2.5.1",
"sanitize.css": "^4.0.0",
"speakingurl": "^9.0.0",
"superagent": "^2.0.0",
"validator": "^5.4.0",
"whatwg-fetch": "^1.0.0"
},
"devDependencies": {
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-plugin-react-relay": "^0.9.0",
"babel-plugin-transform-react-constant-elements": "^6.9.1",
"babel-plugin-transform-react-inline-elements": "^6.8.0",
"babel-plugin-transform-react-pure-class-to-function": "^1.0.1",
"babel-plugin-transform-react-remove-prop-types": "^0.2.7",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-webpack": "^6.4.1",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.5.0",
"babel-runtime": "^6.9.2",
"bootstrap": "github:twbs/bootstrap#v4-dev",
"bootstrap-datepicker": "^1.6.1",
"carte-blanche": "^0.2.3",
"carte-blanche-react-plugin": "^0.2.2",
"carte-blanche-source-plugin": "^0.1.0",
"chalk": "^1.1.3",
"chart.js": "^1.1.1",
"compression": "^1.6.2",
"cross-env": "^1.0.8",
"css-loader": "^0.23.1",
"enzyme": "^2.3.0",
"eonasdan-bootstrap-datetimepicker": "^4.15.35",
"eventsource-polyfill": "^0.9.6",
"expect": "^1.20.1",
"expect-jsx": "^2.6.0",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"fastclick": "^1.0.6",
"file-loader": "^0.9.0",
"font-awesome": "^4.6.3",
"gmaps": "^0.4.24",
"gulp": "^3.9.1",
"handlebars": "^4.0.5",
"highcharts": "^4.2.5",
"hint.css": "^2.3.1",
"image-webpack-loader": "^1.8.0",
"imports-loader": "^0.6.5",
"ip": "^1.1.3",
"jquery": "^2.2.4",
"jquery-ui-touch-punch": "^0.2.3",
"jquery.maskedinput": "^1.4.1",
"json-loader": "^0.5.4",
"laravel-elixir": "^6.0.0-4",
"laravel-elixir-uncss": "^2.1.0",
"material-design-icons": "^2.2.3",
"minimist": "^1.2.0",
"ngrok": "^2.2.1",
"normalize.css": "^4.1.1",
"offline-plugin": "^3.4.0",
"plop": "^1.5.0",
"postcss-cssnext": "^2.6.0",
"postcss-focus": "^1.0.0",
"postcss-import": "8.1.0",
"postcss-loader": "^0.9.1",
"postcss-reporter": "^1.3.3",
"progressbar.js": "^1.0.1",
"raw-loader": "^0.5.1",
"rc-slider": "^3.7.2",
"react-bootstrap-table": "^2.3.6",
"react-motion": "^0.4.4",
"rimraf": "^2.5.2",
"select2": "^4.0.3",
"select2-bootstrap-theme": "0.1.0-beta.7",
"shelljs": "^0.7.0",
"style-loader": "^0.13.1",
"sw-precache": "^3.2.0",
"sweetalert": "^1.1.3",
"twitter-bootstrap-wizard": "^1.2.0",
"url-loader": "^0.5.7",
"webpack": "^2.1.0-beta.13",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.10.0",
"webpack-manifest-plugin": "^1.0.1",
"why-did-you-update": "0.0.8"
},
"engines": {
"npm": ">=3"
},
"react-relay-schema": "http://api.pickuphub.net/schema.json",
"scripts": {
"analyze": "node ./internals/scripts/analyze.js",
"build": "npm run build:clean && npm run build:webpack && npm run build:gulp",
"build:clean": "rimraf ./web/build-webpack/*",
"build:dll": "node ./internals/scripts/dependencies.js",
"build:gulp": "gulp --production",
"build:webpack": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --bail --color",
"generate": "plop --plopfile internals/generators/index.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"postinstall": "npm run build:dll",
"postsetup": "npm run build:dll",
"preinstall": "npm run npmcheckversion",
"start": "npm run start:tunnel",
"start:tunnel": "cross-env NODE_ENV=production node internals/server"
}
}
I'm having the exact same issue right after adding "carte-blanche" to a project which was fine working before. As the error states in your console... to start investigate, just go to your "node_modules/webpack/lib/Compilation.js" file and scroll to the line "594" (exactly like the error tells you). Then on this line 594, i've modified the file a bit:
if (!d.getWarnings) {
console.info('doh!', d.module.dependenciesErrors);
}
Well i'm already a bit further now as i'm only outputting the "module.dependenciesErrors", but you could start by simply outputting "d".
As the error tells you, "d.getWarnings" is not a function! With the if we can detect the error case and with the "console.info" we can start investigating.
Now i still have no clue at all why "d" has suddenly no "getWarnings" function anymore, where all other d's obviously have it (or webpack Compilation would never have worked :P)
But now i'm starting to see what the real causes are, causing the error finally i guess -> carte-blanche is not finding some folders -.- Extremely annoying this can't be just reported to the console...
I think this "d.getWarnings is not a function" can happen with all possible dependencies problems/errors - it won't be related directly to carte-blanche, or the :tunnel script mentioned here or whatever. I think everything what goes wrong during dependencies build in a webpack project can cause this.