-
Notifications
You must be signed in to change notification settings - Fork 302
RC4 fails to build with an error in source-node.js:95 #593
Comments
From @coreymcmahon on December 16, 2016 5:12 Potentially related to the same bug here: angular/angular-cli@22a6b59 |
From @themastersoda on December 16, 2016 8:0 Getting the same error EDIT: Further investigation shows, that Also, npm gives error
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
Obviously this isn't a long-term fix, but good enough to get things building again. |
From @pimol on December 16, 2016 16:4 Updated: Similar error. To be sure, just after I updated to RC4 I run "ionic start NewAppTest blank --v2
and then, if I run ionic serve I get:
RESOLVED: I installed node and Ionic from scratch |
From @st1s on December 16, 2016 16:39 +1 here
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 |
+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, |
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, |
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.
|
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: ionic-team/ionic-framework#9658
The text was updated successfully, but these errors were encountered: