Closed jgw96 closed 7 years ago
From @coreymcmahon on December 16, 2016 5:12
Potentially related to the same bug here: https://github.com/angular/angular-cli/commit/22a6b59dd429356bd617ae3dfceb51335aa815d2
From @themastersoda on December 16, 2016 8:0
Getting the same error
EDIT: Further investigation shows, that ionic serve --prod
completes just fine, but still says build dev finished in ...
which is probably correct, sine i dont think there even exists a prod mode for serve. So my temporary fix for this is to serve/build everthing with --prod
flag.
Also, npm gives error
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\MyPC\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js"
"run" "ionic:serve" "--"
which shows empty -- flag. Could it be that a parameter is always expected?
From @coreymcmahon on December 16, 2016 9:2
I'm not sure what the root cause is here, but I hacked around this by editing the file in node_modules
directly and just adding a return
statement before the failing line:
node_modules/webpack-sources/node_modules/source-map/lib/source-node.js:95
Obviously this isn't a long-term fix, but good enough to get things building again.
From @herbzi on December 16, 2016 12:5
dup: https://github.com/driftyco/ionic-app-scripts/issues/562 I can run ionic rc4 with app scripts .46 without any issue. But .47 brings up this error.
From @pimol on December 16, 2016 16:4
Updated: RESOLVED: I installed node and Ionic from scratch
Similar error. To be sure, just after I updated to RC4 I run "ionic start NewAppTest blank --v2 I got a warning:
Installing npm packages...
npm WARN peerDependencies The peer dependency @angular/tsc-wrapped@* included from @ionic/app-scripts will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency rxjs@* included from @ionic/app-scripts will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN optional dep failed, continuing fsevents@1.0.15
and then, if I run ionic serve I get:
Binary is fine; exiting.
npm ERR! Windows_NT 10.0.14393
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.6.1
npm ERR! npm v2.15.9
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package rxjs@5.0.0-beta.12 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/core@2.2.1 wants rxjs@5.0.0-beta.12
npm ERR! Please include the following file with any support request:
npm ERR! S:\IonicProject\ListaSpesa\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
RESOLVED: I installed node and Ionic from scratch
From @st1s on December 16, 2016 16:39
+1 here
I'm not sure what the root cause is here, but I hacked around this by editing the file in node_modules directly and just adding a return statement before the failing line:
node_modules/webpack-sources/node_modules/source-map/lib/source-node.js:95
Obviously this isn't a long-term fix, but good enough to get things building again. @herbzi
Confirmed. A workaround to get it working for now is just add an if on line 95
var nextLine = remainingLines[0];
if (!nextLine) return;
From @parkbytes on December 17, 2016 17:38
I was facing the same issue and isolated the problem to multiple components within same .ts file. in my RC3 project.
Update: More specifically this occurs when the second component within the .ts file uses a templateUrl as opposed to template for its decoration.
Applied the single responsibility principle from Angular and separated the components into their respective .ts files to resolve the original issue reported here.
https://angular.io/docs/ts/latest/guide/style-guide.html#!#single-responsibility
I was able to narrow down the issue by manually migrating old rc3 project (part by part) to a freshly created rc4 project.!!!
Maybe the experts can confirm.
From @st1s on December 18, 2016 22:4
Confirmed. After a refact of my code and doing a fresh install, I don't need more the workaround above
I can not tell for sure what the problem was, but I just split everything into components and providers and booom
Duh! a fresh install means exactly what commands
npm install npm@latest -g ???
@AlGantori I think he means a fresh ionic app, anyway having only 1 Component with templateUrl per file seems to temporarily fix it.
If this is intended there should probably be a humanised error message, prob an issue to raise with Angular.
Thanks @jgw96, Inlining the second template in the component file removed the source-node error
@jgw96 what do you mean when you say fresh install
?
+1 (I got the same error on RC5)
I believe this is resolved with 1.0.0. Can you please let me know if it's not? I have never been able to recreate.
Thanks, Dan
Easy to reproduce in a fresh install of 2.0.0 just today - create a .ts with two @Component defined - both of which with a templateUrl defined - splitting them out into two files resolves it.
@alexanderwilkie This error was driving me crazy until today (RC4, RC5 and 2.0.0). Doing @jgw96 edits everytime. I split all my components and errors are gone. Good for futures packages updates.
EDIT : I delete node_modules folder and reinstall all with npm install to check
Ahhh, okay, nice, good catch!
Thanks, Dan
Confirmed still an issue.
To reproduce, create two components in the same file. (for me a Page, and then a small Modal Pane) both with templateUrl.
Splitting the modal into it's own definition typescript file is the workaround, but would be nice to get these components next to each other in the same source.
Ionic Framework: 2.0.0
Ionic Native: 2.4.1
Ionic App Scripts: 1.0.0
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 6.9.5
OS Platform: macOS Sierra
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
had the same issue today.. shouldnt this issue be opened?
I also experienced this working with the ModalController in Ionic and had two components in one file as @robshep experienced. I created a separate file for the Modal component and it resolved my issue.
Same here with 3.1.2
same here with 3.4.0
but good to know it can be fixed by just splitting everything out into its own file
From @coreymcmahon on December 16, 2016 5:0
Ionic version: (check one with "x") [ ] 1.x [x] 2.x
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request
Current behavior:
ionic-build
andionic-serve
result in a CLI error.Expected behavior:
ionic-build
andionic-serve
should build and serve the app (respectively) as expected.Steps to reproduce:
Other information:
App was building as expected before doing the RC4 upgrade (we were using RC3).
Ionic info:
Copied from original issue: driftyco/ionic#9658