I want to view my ionic project in Ionic View but all it shows is a white screen. Tried running ionic run android -l -c to debug my project but it shows me the following response
ionic-hello-world#0.0.0 ionic:serve C:\Users\GClairGC\Desktop\Angular\wasteman agementsystem
ionic-app-scripts serve "--v2" "--runLivereload" "--isPlatformServe" "--consol elogs" "--livereload" "--port" "8101" "--livereload-port"
"35730" "--address" "1
92.168.8.228" "--iscordovaserve" "--nobrowser"
[21:47:32] ionic-app-scripts 1.3.0 [21:47:32] watch started ...
[21:47:32] build dev started ... events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:53703
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at Server._listen2 (net.js:1262:14)
at listen (net.js:1298:10)
at net.js:1408:9
at _combinedTickCallback (internal/process/next_tick.js:83:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)
npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program
Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "run" "ionic:serve" "--" "--v2"
"--runLivere load" "--isPlatformServe" "--consolelogs" "--livereload"
"--port" "8101" "--live reload-port" "35730" "--address"
"192.168.8.228" "--iscordovaserve" "--nobrowser " npm ERR! node
v6.10.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR!
ionic-hello-world#0.0.0 ionic:serve: ionic-app-scripts serve "--v2"
"-
-runLivereload" "--isPlatformServe" "--consolelogs" "--livereload" "--port" "810 1" "--livereload-port" "35730" "--address"
"192.168.8.228" "--iscordovaserve" "-
-nobrowser" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ionic-hello-world#0.0.0 ionic:serve script 'ionic-app-scr ipts serve
"--v2" "--runLivereload" "--isPlatformServe" "--consolelogs" "--liver
eload" "--port" "8101" "--livereload-port" "35730" "--address"
"192.168.8.228" "
--iscordovaserve" "--nobrowser"'. 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 ionic-hello-world pac kage, npm ERR!
not with npm itself. npm ERR! Tell the author that this fails on your
system: npm ERR! ionic-app-scripts serve "--v2" "--runLivereload"
"--isPlatformServe " "--consolelogs" "--livereload" "--port" "8101"
"--livereload-port" "35730" "-- address" "192.168.8.228"
"--iscordovaserve" "--nobrowser" npm ERR! You can get information on
how to open an issue for this project with: npm ERR! npm bugs
ionic-hello-world npm ERR! Or if that isn't available, you can get
their info via: npm ERR! npm owner ls ionic-hello-world npm ERR!
There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!
C:\Users\GClairGC\Desktop\Angular\wastemanagementsystem\npm-debug.log
package.json
{ "name": "ionic-hello-world", "version": "0.0.0", "author": "Ionic Framework", "homepage": "http://ionicframework.com/", "private": true, "scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve" },
"dependencies": {
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#angular/router": "4.0.0",
"#ionic-native/core": "3.4.2",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic/storage": "2.0.1",
"angular2-qrcode": "^2.0.1",
"firebase": "^3.8.0",
"ionic-angular": "3.0.1",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4" },
"devDependencies": {
"#ionic/app-scripts": "1.3.0",
"typescript": "~2.2.1" },
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard" ],
"cordovaPlatforms": [],
"description": "auth: An Ionic project" }
index.html
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<!--<title>Loading..</title>-->
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.log('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
</head>
<body>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The bundle js is generated during the build process -->
<script src="build/main.js"></script>
</body>
</html>
Hi first try to run ionic serve after this try running ionic build android than try
ionic run -l -c
it will work for you.
if you have started your poject before some time, let me tell you many things got changed, in your index.html should have these lines, and a few other things get changed around:
<!-- Polyfill needed for platforms without Promise and Collection support -->
<script src="build/js/es6-shim.min.js"></script>
<!-- Zone.js and Reflect-metadata -->
<script src="build/js/angular2-polyfills.js"></script>
Related
Because the node-sass was no longer maintain and did no compatiable with the higher version of node, so I tried to change the node-sass to dart-sass, when I use the dart-sass in the vue project like this:
"sass": "1.48.0",
shows error:
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:710:50: note: 'remove_cv' declared here
npm ERR! template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
npm ERR! ^
npm ERR! 1 error generated.
npm ERR! make: *** [Release/obj.target/binding/src/binding.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/xiaoqiangjiang/source/reddwarf/frontend/crx-selection-translate/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/Users/xiaoqiangjiang/.nvm/versions/node/v16.13.2/bin/node" "/Users/xiaoqiangjiang/source/reddwarf/frontend/crx-selection-translate/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/xiaoqiangjiang/source/reddwarf/frontend/crx-selection-translate/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xiaoqiangjiang/.npm/_logs/2022-01-15T11_36_53_164Z-debug.log
why did this happen? what should I do fix this problem? This is my project package.json:
{
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/jiangxiaoqiang/crx-selection-translate.git"
},
"scripts": {
"xpostinstall": "node ./build/install-pdf-viewer",
"dev": "webpack --config build/webpack.dev.config.js",
"build": "gulp --cwd . --gulpfile build/gulp-build.js",
"test": "karma start build/karma.config.js"
},
"dependencies": {
"bootstrap-sass": "^3.4.1",
"chrome-call": "^1.0.2",
"connect.io": "^3.1.3",
"interact.js": "^1.2.6",
"js-wheel": "git+https://github.com/jiangxiaoqiang/js-wheel.git",
"translation.js": "git+https://github.com/jiangxiaoqiang/translation.js.git",
"vue": "^1.0.24",
"vue-router": "^0.7.11"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.9.0",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.9.0",
"babel-preset-stage-3": "^6.5.0",
"chrome-env": "^0.0.6",
"css-loader": "^0.23.1",
"del": "^2.2.0",
"download": "^5.0.0",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"fs-extra": "^8.1.0",
"gulp": "^3.9.1",
"gulp-clean-css": "^2.3.2",
"gulp-htmlmin": "^2.0.0",
"gulp-jsonmin": "^1.2.0",
"gulp-uglify": "^1.5.3",
"gulp-zip": "^3.2.0",
"isparta-loader": "^2.0.0",
"jasmine-core": "^2.99.1",
"karma": "^0.13.22",
"karma-chrome-launcher": "^1.0.1",
"karma-coverage": "^1.1.2",
"karma-coveralls": "^1.2.1",
"karma-firefox-launcher": "^1.3.0",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.1.2",
"karma-phantomjs-launcher": "^1.0.0",
"karma-safari-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^1.7.0",
"phantomjs-prebuilt": "^2.1.6",
"raw-loader": "^0.5.1",
"sass": "1.48.0",
"sass-loader": "^3.2.0",
"style-loader": "^0.13.0",
"vue-html-loader": "^1.2.0",
"webpack": "^1.13.1"
},
"author": "Jiangxiaoqiang <jiangtingqiang#gmail.com>",
"license": "GPLv3",
"bugs": {
"url": "https://github.com/jiangxiaoqiang/crx-selection-translate/issues"
},
"homepage": "https://github.com/jiangxiaoqiang/crx-selection-translate#readme"
}
the node version is 16 and the os was macOS moteney with M1 chip.
Not sure if this is the same issue but I was able to fix the installation by using the following commands:
rm -rf node_modules
rm yarn.lock
yarn install -std=c++17
Found the answer with an explanation here
Additional troubleshooting I ran into that unrelated to this exact question:
If unable to load external module #babel/register make sure that both babel-core and babel-register are installed as well as the gulp-cli: yarn global add gulp-cli.
If using node-sass and receiving the following error:
Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Unsupported runtime (108)
remove node-sass and use dart-sass:
npm uninstall gulp-sass
npm uninstall gulp-sass-lint
npm i gulp-dart-sass
I had the same issue on my Mac M1. In my case, sass and node versions were not matching. I had to downgrade node from 16.x to 12.x. I guess, if that is possible upgrading sass should also work, but I never did that.
Command Line DartSass for Mac m1
First of all install the missing packages at https://brew.sh/
Copy this:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After: npm i -d sass
after a careful research it seems that m1 is missing many packages to make dart sass work for this reason everything that is missing must be installed with the line written above.
This is the ERROR. I use visual studio code with gitBash.
$ npm i mini-css-extract-plugin
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: lesson-54-intro-webpack#1.0.0
npm ERR! Found: webpack#4.46.0
npm ERR! node_modules/webpack
npm ERR! dev webpack#"^4.39.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^5.0.0" from mini-css-extract-plugin#2.2.0
npm ERR! node_modules/mini-css-extract-plugin
npm ERR! mini-css-extract-plugin#"*" 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\Smith\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\Smith\AppData\Local\npm-cache\_logs\2021-08-19T13_12_04_740Z-debug.log
This is my package JSON file. What could be wrong here?
How to match versions?
{
"name": "lesson-54-intro-webpack",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server",
"build": "webpack"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"#babel/core": "^7.5.5",
"#babel/preset-env": "^7.5.5",
"autoprefixer": "^9.6.1",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.6",
"babel-polyfill": "^6.26.0",
"css-loader": "^3.1.0",
"file-loader": "^4.1.0",
"html-webpack-plugin": "^3.2.0",
"postcss-loader": "^3.0.0",
"precss": "^4.0.0",
"style-loader": "^0.23.1",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.7.2"
},
"dependencies": {
"axios": "^0.19.0"
}
}
See the edit below.
As the error says the webpack version not matched try either:
upgrade lesson-54-intro-webpack package
downgrade mini-css-extract-plugin
Edit: based on your package.json content
You need to upgrade your webpack version to version 5
i am trying to run npm install command on my project and i keep getting an error i do not understand, please i need help on getting to the root of the error.
my package.json
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.6.0",
"serverless-bundle": "^1.3.3",
"serverless-pseudo-parameters": "^2.5.0",
"webpack": "^4.35.2"
},
"dependencies": {
"#middy/core": "^2.2.0",
"#middy/http-cors": "^2.2.0",
"#middy/http-error-handler": "^2.2.0",
"#middy/http-event-normalizer": "^2.2.0",
"#middy/http-json-body-parser": "^2.2.0",
"#middy/validator": "^2.2.0",
"aws-sdk": "^2.639.0",
"decimal.js": "^10.2.1",
"http-errors": "^1.8.0"
}
The error i keep getting:
npm ERR! code 1
npm ERR! path PROJECT_PATH/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /Users/dami/.nvm/versions/node/v16.2.0/bin/node /Users/dami/dev/capitack/capitack-backend/orderbook-service/node_modules/node-sass/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/Users/dami/.node-gyp/16.2.0/include/node -I/Users/dami/.node-gyp/16.2.0/src -I/Users/dami/.node-gyp/16.2.0/deps/openssl/config -I/Users/dami/.node-gyp/16.2.0/deps/openssl/openssl/include -I/Users/dami/.node-gyp/16.2.0/deps/uv/include -I/Users/dami/.node-gyp/16.2.0/deps/zlib -I/Users/dami/.node-gyp/16.2.0/deps/v8/include -I../src/libsass/include -O3 -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
Please i really need help with solving this issue.
I fixed the error, as it appears the error occurred because i was using node 16> so i tried downgrading to node 14> using nvm and it worked just fine!.
Thanks to everyone for helping out
try with sudo command if you are using linux based systems
sudo npm i
else try to run it with full previlage in windows based system.
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 am using npm version 3.8.6.
I installed the latest Nodejs version, and did this
MacBook-Pro-de-MarceloRS:promo-mobile-ccsearchlp7a Marcelo$ rm -rf node_modules/; npm install
npm WARN deprecated gulp-foreach#0.1.0: Either use gulp-tap or gulp-flatmap, depending on your needs
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.0.0
npm ERR! npm v3.8.6
npm ERR! Invalid Version: 1.0.5beta
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Marcelo/Documents/Projects/BankOfAmericaApps/promo-mobile-ccsearchlp7a/npm-debug.log
MacBook-Pro-de-MarceloRS:promo-mobile-ccsearchlp7a Marcelo$ npm -v
3.8.6
Why do you think it is ?
I am using OSX El Capitan.
EDIT
Here is my package.json
{
"name": "promo-mobile-ccsearchlp7a",
"app": "app",
"dist": "dist",
"version": "2.0.0",
"private": true,
"dependencies": {
"assemble": "~0.9.1",
"browser-sync": "~2.11.1",
"del": "~2.2.0",
"engine-handlebars": "^0.8.0",
"get-value": "~2.0.3",
"gulp": "~3.9.1",
"gulp-autoprefixer": "~3.1.0",
"gulp-cssnano": "~2.1.1",
"gulp-eslint": "~2.0.0",
"gulp-extname": "~0.2.2",
"gulp-filter": "~3.0.1",
"gulp-flatten": "~0.2.0",
"gulp-foreach": "~0.1.0",
"gulp-imagemin": "~2.4.0",
"gulp-load-plugins": "~1.2.0",
"gulp-notify": "~2.2.0",
"gulp-plumber": "~1.1.0",
"gulp-sass": "~2.2.0",
"gulp-sourcemaps": "~1.6.0",
"gulp-uglify": "~1.5.2",
"gulp-usemin": "~0.3.20",
"gulp-util": "~3.0.7",
"handlebars-helpers": "github:assemble/handlebars-helpers#dev",
"main-bower-files": "~2.9.0",
"multimatch": "~2.1.0",
"run-sequence": "~1.1.5"
},
"engines": {
"node": ">=0.12.2"
},
"devDependencies": {
"git-guppy": "~1.1.0",
"gulp-watch": "~4.3.5"
},
"scripts": {
"postinstall": "bower install"
}
}
Mine installed fine. But I note the following:
I installed under Node V5.
You are using Node V6.
I got the following notices:
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v6.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
You need to update you package.json to fetch lodash v4 and graceful-fs v4
(easiest method for me is to remove these two lines from package.json and npm --save install package install the two again