Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Error: app-scripts serve unexpectedly failed. using 1.3.4 and 1.3.4 with cli.beta9 and angular3.1.0 #927

Closed
mburger81 opened this issue Apr 27, 2017 · 12 comments

Comments

@mburger81
Copy link
Contributor

Short description of the problem:

Using last ionic-cli@beta9 with app-scripts 1.3.4 as 1.3.5 with [email protected] on run ionic serve I get this error:

Error: app-scripts serve unexpectedly failed.
    at Object.<anonymous> (/ionic3-app-scripts-bug3.1.0/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:45:19)
    at next (native)
    at fulfilled (/ionic3-app-scripts-bug3.1.0/node_modules/@ionic/cli-plugin-ionic-angular/dist/serve.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:109:7)
michi@zotacei730:~/ionic3-app-scripts-bug3.1.0$ [10:09:03]  tslint: src/components/player/la-player.component.ts, line: 2 
(node:9585) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed

The problem for sure is coming from ionic-cli v3 beta9 but the error occurs on ionic app-scripts so I open the bug here. ionic-angular3.1.0 probably does not care.

What behavior are you expecting?

It should work as expected

Steps to reproduce:
use branch cli@[email protected] from this repo https://github.com/mburger81/ionic3-app-scripts-bug.git and launch ionic serve

Which @ionic/app-scripts version are you using?
1.3.4 and 1.3.5

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

npm (global):
    @ionic/cli-utils : 1.0.0-beta0
    cordova          : 6.5.0 
    ionic            : 3.0.0-beta9

npm (local):
    @ionic/app-scripts              : 1.3.5
    @ionic/cli-plugin-cordova       : 1.0.0-beta0
    @ionic/cli-plugin-ionic-angular : 1.0.0-beta0
    Ionic Framework                 : ionic-angular 3.1.0

System:
    Node       : v6.10.2
    OS         : Linux 4.10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
@mburger81
Copy link
Contributor Author

I have this BUG also using ionic-cli.beta7 after upgrading to [email protected]
After downgrade back to 1.3.4 I still had the issue.

Magically after some millions of tentative, reboots, node_modules removed and other many things I did, I don't know what is happening but it returns to work.

But this is happening not only one time, but many times.
😢 next big problem for us

@trakhimenok
Copy link

For me it solved by:

  1. Unsintalling ionic sudo npm unsintall -g ionic
  2. Remove node_modules folder inside app
  3. Run sudo npm install -g ionic@beta
  4. Update all dependencies as specified in CHANGELOG.md
  5. Run npm install in app folder

After that it works. Spend an hour trying to make it working. Simply reinstalling ionic@beta or just node_modules did not help. You need to do it together.

@mburger81
Copy link
Contributor Author

mburger81 commented Apr 27, 2017

Hi @astec
first of all thx for your answer,

but naturally also this scenario we tried to do before and also retested it now. But the result is always the same.
Perhaps you was lucky as we was before in the morning when after many things we did and we can not remember we got it magically work.

So this for now is not the solution for us, but the bigger problem is at the moment we are also NOT able to get it work with no version of cli / app-script or ionic-angular 😠

Can you perhaps share more information?
In this case we are using ionic-cli@beta9, [email protected] and [email protected], what are you using? This is our package.json

  "dependencies": {
    "@angular/common": "4.0.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@ionic-native/core": "3.5.0",
    "@ionic-native/splash-screen": "3.5.0",
    "@ionic-native/status-bar": "3.5.0",
    "@ionic/storage": "2.0.1",
    "@swimlane/ngx-datatable": "8.0.0",
    "angular2-websocket": "0.9.2",
    "chart.js": "2.5.0",
    "ionic-angular": "3.1.0",
    "ionicons": "3.0.0",
    "jssip": "3.0.7",
    "ng2-charts": "1.5.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.4",
    "@ionic/cli-plugin-cordova": "^1.0.0-beta0",
    "@ionic/cli-plugin-ionic-angular": "^1.0.0-beta0",
    "typescript": "~2.2.1"
  },

@mburger81
Copy link
Contributor Author

Also upgrade ionic & @ionic/cli-plugin-cordova & @ionic/cli-plugin-ionic-angular to latest canary alpha.9a8116f6 version does not resolve the problem.

@mburger81
Copy link
Contributor Author

I tried also upgrade app-script to 1.3.5 and redo all the steps mentioned by @astec
But still no success, I think he had only a lot of luck to get it work again 😄

@mburger81
Copy link
Contributor Author

I also tried to revert to [email protected] and [email protected] but and redo @astec howto, but nothing changed!!! So there is no possibility to resolve this for us.

@mburger81
Copy link
Contributor Author

Error persists on using latest nightly @1.3.5-201704271445

@danbucholtz
Copy link
Contributor

danbucholtz commented Apr 27, 2017

How do I recreate this? I've never heard of this one before.

Thanks,
Dan

@mburger81
Copy link
Contributor Author

Hi Dan, I wrote in the issue under Steps to reproduce what you can try to do.

With this also on a new clone I can reproduceit. If you are not able to do tat, probabbly it would be a cli/system problem. And that will hurts!! 😄

@danbucholtz
Copy link
Contributor

danbucholtz commented Apr 28, 2017

@mburger81,

I cannot recreate this. If you are still encountering this, let me know and let's try to figure out how to fix it.

{
  "name": "ionic3-app-scripts-bug",
  "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.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@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",
    "ionic-angular": "3.1.0",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.6",
    "@ionic/cli-plugin-ionic-angular": "^1.0.0-beta0-alpha.5107a661",
    "typescript": "~2.2.1"
  },
  "version": "0.0.1",
  "description": "An Ionic project"
}

That is my package.json updated to latest deps.

I installed the latest ionic cli.

npm uninstall -g ionic
npm install -g ionic@canary

Thanks,
Dan

@crash7
Copy link

crash7 commented Apr 29, 2017

Hi all,

I have the same error using all ~@canary and latest app-scripts. I ended adding a return after the following line https://github.com/driftyco/ionic-app-scripts/blob/master/src/serve.ts#L67 and it started to work. So apparently I'm getting a build error that's not logged anywhere (bug?).

The error is Error: A watch configured to watch the following paths failed to start. It likely that a file referenced does not exist which is weird because this project works well on MacOS (using ubuntu here). I raised the number of watchers but didn't solve the issue.

The return config works fine for now 😄

@mburger81
Copy link
Contributor Author

Hi @danbucholtz I don't know what's happening with my last post. But on friday morning I wrote here, that upgrading ionic cli to beta 10 resolved me this issue!

So I'll have a look on this bug but it seems with beta10 anything is okay again.

I nevery was seeing the error from @crash7 so I don't know about that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants