-
Notifications
You must be signed in to change notification settings - Fork 311
[0.0.43]build dev failed #361
Comments
Upgrading from a new tabs project with 0.0.42 (where dev failed also):
produces an:
Config:
And dev build hangs without serving anything, nor giving an error:
Starting with a new project:
Produces an error:
|
same problem,waiting for reply |
Actually, it works for me if I
|
It happens because
You can open your
which is a temporary workaround for Edit: Nevermind. Have a look at #367 |
I had this problem when using yarn, wiping node_modules and using npm
instead fixed the issue.
|
This still does not work for me. I must insist that the error appears in a brand new project. In my case, @michael-brade solution (the declarations.d.ts and typescript dependencies) are already correct from the template. Worse of all, the command:
hangs forever on:
without NEVER producing any apparent error, nor opening any browser window. |
It seems that the package.json is broken in the template. See ionic-team/ionic-cli#1660 (comment). To fix, remove "ionic:build" and "ionic:serve" in the "scripts" part and leave it like that:
It's commented https://github.com/driftyco/ionic-app-scripts#npm-scripts. |
@jrierab Not working for me? What just happend here? Why can something be broken without any updates? |
fix for me is to change
into:
ionic-app-scripts 0.0.42 |
@kabus202 Like I said above, starting from a blank project, it never serves the page. It freezes without giving any error:
Your workaround freezes the same after building, but does not even try to serve the page. So, to build, package.json must be like:
Then, I have to Ctrl-C and edit package.json to allow serving the page (but then it doesn't build):
This "workaround" works for me, but it is not very productive :-) |
What happens if you change serve into this:
|
It serves the page, but does not run the build process. |
Modifying the scripts in package.json resulted in:
|
Now that it's running, I just upgraded my NPM to 4.0.2, I think it should be the NPM version that caused the problem, thanks guys :) |
Npm 3.10.9 is the version which comes with last node LTS 6.9.1. And it is the version I was using, and the build process fails with it... Installing npm 4.0.2 as @NoGoout suggested did the trick:
However, in Ubuntu, the default browser does not automatically open the page (I must start it manually, then it reloads when source is modified, and it is very FAST). Moreover, I should kill the script with Ctrl-C (q and exit commands are not recognized; no command is recognized as it used to be). But these are minor annoyances. BTW, this is true also for the 0.0.44 version of the scripts. |
Make sure you are running the latest CLI. Thanks, |
I am running the latest (as of 2016-11-25 12:15)
I have created a test project.
Attempting to serve the project causes the hang.
It hangs at a newly displayed line 'dev server running'. (Haven't seen that line displayed in earlier versions)
I have a project scaffolded using an earlier version of ionic which still works. I notice that the package.json file is different. Notably this line:
Removing it and replacing it with:
Causes 'ionic serve' to behave correctly again and launch the app in a browser. I hope this is of some help. It seems the latest ionic does not generate a correct package.json file.
|
Can you install the latest
Thanks, |
I don't recommend changing the
|
TS 2.1: tried (really wanted to enable that async/await support with an ES5 target, since using an ES6 target requires disabling uglify), but rolled back to TS 2.0.10 since anything from 2.1 appeared unstable for me. |
ionic start --v2 TestCode02
ionic serve
[12:32:43] ionic-app-scripts 0.0.43
[12:32:43] watch started ...
[12:32:43] build dev started ...
[12:32:43] clean started ...
[12:32:43] clean finished in less than 1 ms
[12:32:43] copy started ...
[12:32:43] transpile started ...
[12:32:46] build dev failed: Cannot read property 'length' of undefined
[12:32:46] copy finished in 3.04 s
[12:32:46] watch ready in 3.04 s
[12:32:46] dev server running: http://localhost:8100/
Your system information:
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.7
Ionic App Lib Version: 2.1.4
Ionic App Scripts Version: 0.0.43
ios-deploy version: 1.9.0
ios-sim version: 5.0.9
OS: OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 8.0 Build version 8A218a
The text was updated successfully, but these errors were encountered: