Closed X4V1 closed 7 years ago
I have the same problem here... I updated to RC1 and it become impossible to launch the app and I always have these UMMET PEER DEPENDENCY when I npm install..
Anyone has a solution ?
Use:
"dependencies": {
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/compiler-cli": "0.6.2",
"@angular/core": "2.0.0",
"@angular/forms": "^2.0.0",
"@angular/http": "^2.0.0",
"@angular/platform-browser": "^2.0.0",
"@angular/platform-browser-dynamic": "^2.0.0",
"@angular/platform-server": "^2.0.0",
"ionic-angular": "^2.0.0-rc.1",
"ionicons" : "^3.0.0",
"@ionic/storage": "^1.0.3",
"ionic-native": "^2.0.3",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.21"
},
"devDependencies": {
"@ionic/app-scripts": "^0.0.33",
"typescript": "^2.0.3"
}
For a working example -> https://github.com/marcoturi/ionic2-boilerplate/blob/master/package.json
@ZiFFeL1992 your package.json is not working to me:
npm WARN @angular/platform-browser-dynamic@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/http@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/platform-browser@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/forms@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/common@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/platform-server@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed. npm WARN @angular/compiler@2.1.0 requires a peer of @angular/core@2.1.0 but none was installed.
Please run rm -rf node_modules/ && npm i
to test it
Missed the carrot:
"@angular/core": "^2.0.0",
It's fine in the PR, modify it and check again please.
@marcoturi that solves the dependencies, but application won't compile. try
cordova platform add android
ionic run android
see also #8687
@rlucian to me is working https://github.com/marcoturi/ionic2-boilerplate git clone, npm i, npm run android:release
did exactly that, with ionic build
at instead of run, and i am getting these:
ionic build
Running 'build:before' npm script before build
> ionic2-boilerplate@0.5.0 build \i2-test
> bnr build
running better-npm-run in \i2-test
Executing script: build
to be executed: "ionic-app-scripts build"
[14:44:52] ionic-app-scripts 0.0.30
[14:44:52] build prod started ...
[14:44:52] clean started ...
[14:44:52] clean finished in 5 ms
[14:44:52] copy started ...
[14:44:52] ngc started ...
[14:44:52] lint started ...
[14:44:52] copy finished in 107 ms
[14:44:53] lint finished in 1.10 s
[14:45:00] ngc: Error: Compilation failed. Resource file not found: D:/home.html
at Object.resourceLoader.get (D:\i2-test\node_modules\@angular\compiler-cli\src\codegen.js:123:27)
at DirectiveNormalizer._fetch (D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:13329:45)
at DirectiveNormalizer.normalizeTemplateAsync (D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:13372:23)
at DirectiveNormalizer.normalizeDirective (D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:13347:46)
at D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:12849:139
at Array.map (native)
at D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:12849:80
at Array.map (native)
at OfflineCompiler.compile (D:\i2-test\node_modules\@angular\compiler\bundles\compiler.umd.js:12842:31)
at D:\i2-test\node_modules\@angular\compiler-cli\src\codegen.js:108:18
[14:45:00] ngc: Compilation failed
[14:45:00] ngc failed: NGC encountered an error
[14:45:00] Error: NGC encountered an error
at ChildProcess.<anonymous> (D:\i2-test\node_modules\@ionic\app-scripts\dist\ngc.js:62:24)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at ChildProcess.cp.emit (D:\i2-test\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error running ionic app script "build": Error: NGC encountered an error
# ionic info
Your system information:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS:
Node Version: v4.6.0
@ZiFFeL1992 Big thanks ! It works like a charm, no unmet dependency, can serve and build without any mistake.
I don't know how do you found that working solution but you make me save a lot of time.
For me as for @marcoturi it's solved !
I don't know why we have to adapt it manually, it's really weird.
@rlucian read carefully, run those commands (copy and paste one by one):
git clone https://github.com/marcoturi/ionic2-boilerplate.git
cd ionic2-boilerplate
npm i
npm run android:release
@marcoturi I cleaned all the environment and it seems the build errors went away, or at least now are related to the app, not the env. so closed from my pov as well. thank you.
I had an Ionic 2 RC0 application (created with the ionic-cli).
I would like to update to Ionic 2 RC1.
I updated the package.json to:
I deleted the node_module directory. To be sure that there is nothing left i have executed
npm cache clear && npm cache clean
and now when I have some unmet peer dependencies when I try to install all dependencies with
npm install
I don't find a working solution. I'm stuck on this problem for a few hours and I can't find how to solve it. Could you help me please ?