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

[0.0.42] build dev failed #340

Closed
biesbjerg opened this issue Nov 9, 2016 · 78 comments
Closed

[0.0.42] build dev failed #340

biesbjerg opened this issue Nov 9, 2016 · 78 comments
Assignees

Comments

@biesbjerg
Copy link

biesbjerg commented Nov 9, 2016

Short description of the problem:

ionic serve fails:

biesbjerg-macbook-pro:rc-wip kim$ ionic serve
[22:42:00]  build dev failed: Cannot read property 'length' of undefined

> mindly-app@ ionic:serve /Users/kim/ionic/mindly-app/rc-wip
> ionic-app-scripts serve "[object Object]"

[22:42:02]  ionic-app-scripts 0.0.42
[22:42:03]  watch started ...
[22:42:03]  build dev started ...
[22:42:03]  clean started ...
[22:42:03]  clean finished in less than 1 ms
[22:42:03]  copy started ...
[22:42:03]  transpile started ...
[22:42:04]  build dev failed: Cannot read property 'length' of undefined
[22:42:07]  build dev failed: Cannot read property 'length' of undefined
[22:42:07]  copy finished in 4.44 s
[22:42:07]  watch ready in 4.48 s
[22:42:07]  dev server running: http://localhost:8100/

Steps to reproduce:

  1. Follow upgrade steps to 0.0.42
  2. run ionic serve

Which @ionic/app-scripts version are you using?
0.0.42

ionic info:

Your system information:

Cordova CLI: 6.4.0
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.42
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

Complete package.json:

{
  "name": "mindly-app",
  "author": "Kim Biesbjerg@Info Products",
  "homepage": "http://infoproducts.dk/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "1.1.6",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^2.0.0",
    "@ngrx/store": "^2.2.1",
    "angular2-uuid": "^1.1.0",
    "ionic-angular": "2.0.0-rc.2",
    "ionic-native": "^2.2.3",
    "ionicons": "3.0.0",
    "ngrx-store-freeze": "^0.1.4",
    "ngrx-store-logger": "^0.1.5",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@ionic/app-scripts": ">=0.0.39",
    "@types/cordova-plugin-media": "0.0.3",
    "typescript": "^2.0.6"
  },
  "cordovaPlugins": [
    "cordova-plugin-file",
    "cordova-plugin-compat",
    {
      "locator": "https://github.com/EddyVerbruggen/cordova-plugin-backgroundaudio",
      "id": "nl.x-services.plugins.backgroundaudio"
    },
    {
      "locator": "https://github.com/biesbjerg/cordova-plugin-inapppurchase.git",
      "id": "cordova-plugin-inapppurchase"
    },
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard",
    "cordova-plugin-globalization",
    "cordova-plugin-media",
    "cordova-plugin-x-socialsharing",
    "cordova-plugin-google-analytics",
    "cordova-sqlite-storage",
    "cordova-plugin-app-version"
  ],
  "cordovaPlatforms": [
    "ios",
    {
      "platform": "ios",
      "version": "",
      "locator": "ios"
    },
    {
      "platform": "android",
      "version": "",
      "locator": "android"
    }
  ],
  "description": "This app guarantees that your audio books from Mindly are always within reach."
}

EDIT: Ping @danbucholtz ;-)

@biesbjerg
Copy link
Author

Hmm... Removing node_modules and doing a fresh npm install made it work.

Still says > ionic-app-scripts serve "[object Object]" on startup though, but ionic serve seems to work.

@devnigelwheeler
Copy link

After updating to app-scripts 0.0.42 I also have build failed with ionic-serve, in my case:
build dev failed: Cannot find module '../util/Logger'

NOT fixed in my case by removing node_modules and doing a fresh npm install.

ionic-app-scripts serve "[object Object]"

[22:29:11] ionic-app-scripts 0.0.42
[22:29:12] watch started ...
[22:29:12] build dev started ...
[22:29:12] clean started ...
[22:29:12] clean finished in 22 ms
[22:29:12] copy started ...
[22:29:12] transpile started ...
[22:29:19] transpile finished in 6.71 s
[22:29:19] webpack started ...
[22:29:19] build dev failed: Cannot find module '../util/Logger'
[22:29:19] copy finished in 7.05 s
[22:29:19] watch ready in 7.17 s
[22:29:19] dev server running: http://localhost:8100/

ionic info

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.42
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 3.8
Node Version: v6.8.0
Xcode version: Not installed

@jgw96
Copy link
Contributor

jgw96 commented Nov 9, 2016

Hey @biesbjerg and @devnigelwheeler ! Thanks for posting an issue! Could you all post a repo that we can use to reproduce this issue?

@biesbjerg
Copy link
Author

biesbjerg commented Nov 9, 2016

@devnigelwheeler: Your issue is caused by #326 since you're on Linux (I'm on MacOS)

@danbucholtz
Copy link
Contributor

@biesbjerg,

Are you able to recreate or was it just a one-time thing after you did the fresh npm install?

Thanks,
Dan

@biesbjerg
Copy link
Author

@danbucholtz Build works after fresh npm install.

The output ionic-app-scripts serve "[object Object]" looks weird, but does not affect the build process.

@antoinebrault
Copy link

It affects the build.

"ionic serve --browser chrome" doesn't get passed to ionic-app-scripts.

@danbucholtz danbucholtz self-assigned this Nov 10, 2016
@danbucholtz
Copy link
Contributor

This will go out today as part of 0.0.43. I'll close the issue when it does. The weird [Object object] thing will get fixed in a subsequent release as it's something in the CLI project.

Thanks,
Dan

@danbucholtz
Copy link
Contributor

This is resolved. Please install npm install @ionic/app-scripts@latest.

Thanks,
Dan

@Aristona
Copy link

Happens on 0.0.43

There is an issue for this error at #361

@danbucholtz

@ix-xerri
Copy link

ix-xerri commented Nov 18, 2016

Happens on 0.0.45 as well. I get
ionic-app-scripts serve

[12:29:41] ionic-app-scripts 0.0.45
[12:29:41] watch started ...
[12:29:41] build dev started ...
[12:29:41] clean started ...
[12:29:41] clean finished in 3 ms
[12:29:41] copy started ...
[12:29:41] transpile started ...
[12:29:44] build dev failed: Cannot read property 'indexOf' of undefined
[12:29:44] copy finished in 3.15 s
[12:29:44] watch ready in 3.16 s
[12:29:44] dev server running: http://localhost:8100/

I have

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.2
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

@hughred22
Copy link

I have same issue as @ix-xerri

[12:20:44] ionic-app-scripts 0.0.45
[12:20:44] watch started ...
[12:20:44] build dev started ...
[12:20:44] clean started ...
[12:20:44] clean finished in 10 ms
[12:20:44] copy started ...
[12:20:44] transpile started ...
[12:20:53] build dev failed: Cannot read property 'indexOf' of undefined
[12:20:54] copy: Error copying
"/Users/hughred22/nodeapp/probook/Ionic2/Mybuild/firebaseDigitalWorkBook-rc2/src/manifest.json" to
"/Users/hughred22/nodeapp/probook/Ionic2/Mybuild/firebaseDigitalWorkBook-rc2/www/manifest.json": File not
found
[12:20:54] copy finished in 9.45 s
[12:20:54] watch ready in 9.49 s
[12:20:54] 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.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v4.4.6
Xcode version: Xcode 7.3.1 Build version 7D1014

@hughred22
Copy link

Just to share some insight. Look like this error is triggered b/c I have angularFire2 beta 0.6 installed. If I go back to angularFire2 beta 0.5, the error goes away. But I need angularFire2 beta 0.6 as there is major bug fixes in that version. I believe I have 0.6 before App Script update (from 0.0.36 to 0.0.45). No idea what is going wrong.

@danbucholtz
Copy link
Contributor

@ix-xerri, @hughred22,

What is the issue that you're seeing? Are you able to run ionic serve and see your app? Can you install the latest cli and try again? npm install -g ionic.

Please let me know how it goes and if there is an issue here.

Thanks,
Dan

@hughred22
Copy link

ionic serve with blank page as the error mess up something.

@hughred22
Copy link

@danbucholtz Sorry, just update to RC3 and angularFire beta 0.6, and the problem go away.

@ix-xerri
Copy link

I updated ionic to RC3 and still get this error when doing ionic serve.

[04:47:01] ionic-app-scripts 0.0.44
[04:47:01] watch started ...
[04:47:01] build dev started ...
[04:47:01] clean started ...
[04:47:01] clean finished in 4 ms
[04:47:01] copy started ...
[04:47:01] transpile started ...
[04:47:06] build dev failed: Cannot read property 'indexOf' of undefined
[04:47:06] copy finished in 5.09 s
[04:47:06] watch ready in 5.11 s
[04:47:06] dev server running: http://localhost:8100/

This is my ionic info

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.44
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62

@danbucholtz
Copy link
Contributor

@ix-xerri,

Have you customized the build at all? Is there anything unique about your set-up? I cannot recreate that.

Thanks,
Dan

@ix-xerri
Copy link

No. I've setup pages and providers for the tabs template in ionic. But the build system has not been changed.

@ix-xerri
Copy link

ix-xerri commented Nov 19, 2016

This is the line that breaks everything inside module : AngularFireModule.initializeApp(firebaseConfig)

If I console.log AngularFireModule all I get is:
function AngularFireModule() { }

@Demi-ob
Copy link

Demi-ob commented Nov 19, 2016

i am having the same issue here

@vswarte
Copy link

vswarte commented Nov 19, 2016

Same happening here, although I don't have AngularFire. I haven't modified the build in any form either.

Your system information:

Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.4.0

Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.0-beta.3
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID:     Ubuntu Description:     Ubuntu 14.04.3 LTS 
Node Version: v7.1.0

@ix-xerri
Copy link

I just tried using the firebase library alone and it works. Can write to a database no problem and there are no errors.

@thomastthai
Copy link

I started seeing "build dev failed: Cannot read property 'indexOf' of undefined" after I ran these lines:

npm install typings --global
typings install debug --save
typings install dtcordova --save --global
typings install dt
es6-shim --save --global

Before that I only had this error and ionic serve loaded just fine:

Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8100/build/main.css

@danbucholtz
Copy link
Contributor

@thomastthai,

We don't recommend using typings. You can use npm @types, which is what we support.

Thanks,
Dan

@danbucholtz
Copy link
Contributor

@vswarte,

What issue are you seeing? Can you see if you see the same issue with Node 6? We test on Node 4.x LTS and Node 6.x LTS.

Thanks,
Dan

@ix-xerri
Copy link

Not sure I've never seen it. In my case the build did not complete.

@Barryrowe
Copy link

I am seeing this same issue. I do not have any modifications to the build setup. The biggest issue for me here, is that I don't know where to start digging. With the "hidden from the devloper" approach to the build config, things like this take way longer to debug.

output from ionic info:

Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.1
Xcode version: Not installed

Packag JSON:

{
  "name": "armadilo",
  "description": "armadilo: An Ionic project",
  "version": "1.0.3",  
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve --watch",
    "package": "ionic build ios",
    "package-test": "ENV=TEST && ionic build ios",
    "package-prod": "ENV=PROD && ionic build ios",
    "safe-install": "set http_proxy=http://OURPROXY:OURPORT && npm install",
    "start": "ionic serve --browser chrome --platform ios",
    "startlab": "ionic serve --browser chrome --lab",
    "test": "./node_modules/.bin/karma start"
  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "1.1.6",
    "@lge/ng2-cc": "^1.1.0",
    "angular2-busy": "1.0.2",
    "ionic-angular": "2.0.0-rc.3",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "lodash": "^4.13.1",
    "moment": "^2.13.0",
    "openlayers": "3.18.2",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@types/core-js": "^0.9.34",
    "@types/openlayers":"3.18.40",
    "@types/lodash":"4.14.41",
    "@types/moment":"2.13.0",
    "@ionic/app-scripts": "0.0.45",    
    "typescript": "2.0.6"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [
    "ios"
  ]  
}

ionic serve output:

> ionic-app-scripts serve --watch

[12:26:48]  ionic-app-scripts 0.0.45
[12:26:49]  watch started ...
[12:26:49]  build dev started ...
[12:26:49]  clean started ...
[12:26:49]  clean finished in 9 ms
[12:26:49]  copy started ...
[12:26:49]  transpile started ...
[12:27:04]  build dev failed: Cannot read property 'indexOf' of undefined
Config file "D:\git-repos\armadilo-upgrade\--" not found. Using defaults instead.
[12:27:04]  copy finished in 14.86 s
[12:27:04]  watch ready in 15.00 s
[12:27:04]  dev server running: http://localhost:8100/

@uzumakinaruto123
Copy link

uzumakinaruto123 commented Nov 29, 2016

@Barryrowe I had the same error . I solved it by removing everything related to types firebase in tsconfig.json. nothing is required. Dont install @types/firebase , otherwise it will give Duplicate identifier error.

Remove node modules completely. Re-install by npm install.

"angularfire2": "^2.0.0-beta.6",
 "firebase": "^3.6.1"

dev

`"@ionic/app-scripts": "^0.0.45"

EDIT :-

only update to app-scripts 45 helped me. firebase was specific to my project.

@Barryrowe
Copy link

@uzumakinaruto123 Thanks, but I'm already on app-scripts 0.0.45, and I'm not using firebase :/.

@MELAS007
Copy link

MELAS007 commented Nov 30, 2016

@danbucholtz @Barryrowe - the same error here : Failed to load resource: net::ERR_ADDRESS_INVALID from chrome in console and got white screen nothing load....

What can I do?
Please help

@ascorbic
Copy link

There's a lot more info at #468

@scottlepp
Copy link

I'm also seeing: build dev failed: Cannot read property 'indexOf' of undefined

This only occurs for me when first running ionic serve. If I just edit one of my .ts files, it triggers a rebuild, and it builds fine after that.

@MELAS007
Copy link

MELAS007 commented Dec 3, 2016

the same issues and nothing appear on the screen!

@danbucholtz
Copy link
Contributor

It seems like the indexOf null pointer is swallowing a legitimate error. I'll investigate and fix in the coming days.

Thanks,
Dan

@abdel-ships-it
Copy link
Contributor

abdel-ships-it commented Dec 5, 2016

Same issue here, application has been working lately. But for some reason I decided to re-install everything.

Cordova CLI: 4.2.0 
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.1 Build version 8B62
[15:23:56]  ionic-app-scripts 0.0.45 
[15:23:57]  watch started ... 
[15:23:57]  build dev started ... 
[15:23:57]  clean started ... 
[15:23:57]  clean finished in 5 ms 
[15:23:57]  copy started ... 
[15:23:57]  transpile started ... 
[15:24:01]  build dev failed: Cannot read property 'indexOf' of undefined 
[15:24:01]  copy: Error copying "/Users/Abdel/code/digidot-c4-app/src/manifest.json" to 
            "/Users/Abdel/code/digidot-c4-app/www/manifest.json": File not found 
[15:24:01]  copy finished in 4.75 s 
[15:24:01]  watch ready in 4.78 s 
[15:24:01]  dev server running: http://localhost:8100/ 

I have a strange feeling this has to do with node 6.9.1

@Barryrowe
Copy link

Barryrowe commented Dec 5, 2016

If you take a look at this comment on #468 (comment) you can see where we tracked this down to there being typescript errors that may exist, but somehow the logger isn't getting the expect input from the error reporter, and leads to an undefined reference.

In my case, I was able to patch a handful of files to get on to my next issue, but it's likely there are legitimate errors/warnings being eaten by that process. Appears from above @danbucholtz is looking into it.

All that being said, I have not seen this any further after resolving the remainder of my typescript errors and doing a full clean and npm install.

@danielehrhardt
Copy link

Something new?

@askona
Copy link

askona commented Dec 16, 2016

@danbucholtz Problem is still here in 0.47

@danbucholtz
Copy link
Contributor

Can someone provide a concrete reproduction? I have still been unable to recreate.

Thanks,
Dan

@billygerhard
Copy link

billygerhard commented Dec 16, 2016

I was having this problem with 0.0.45, 0.0.46, and 0.0.47. I tried all 3, and was still getting the error. I found the error was trying to use both AngularFire2 and firebase.js in the same page.js file. I had to break out my usage of firebase to a separate page (or you can possibly use a provider) to use firebase.js and return the value to the promise that needs the return value. I ended up using a Modal, and then using the dismiss method from the ViewController.

Call Modal:

    let modal = this.modalCtrl.create(page);
    // Getting data from the modal:
    modal.onDidDismiss(data => {
      console.log('MODAL DATA', JSON.stringify(data));
      this.doSomething(data);
    });

    modal.present(modal);

From Modal (make sure you include ViewController in the constructor):
this.viewCtrl.dismiss(data);

@gujiman
Copy link

gujiman commented Dec 19, 2016

@danbucholtz

Try this on a ionic 2 angularfire project with ionic-app-scripts 0.0.45 (ionic-angular: 2.0.0-rc.3):

  1. run the app in the browser:
ionic serve
  1. Add a reference to firebase in any page and save:
import * as firebase from 'firebase';
  1. ionic will build and serve as normal and the app will work normally in the browser.

  2. now close ionic serve (cntrl+c)

  3. now re-run ionic serve and the error msg should pop up:

build dev failed: Cannot read property 'indexOf' of undefined

  1. This error message doesn't get detected when ionic serve is running. however once ionic serve restarts then this error gets picked up, at that point its hard to trace the error, unless u use git.

@ThonyFD
Copy link

ThonyFD commented Dec 20, 2016

Hi guys,

I've the same issue after create a project with this command ionic start myPojectName blank --v2
I don't change anything in the project, I execute ionic serve and I get the error

This's my ionic info

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v4.5.0
Xcode version: Not installed

ionic serve output

[19:46:50] ionic-app-scripts 0.0.47
[19:46:51] watch started ...
[19:46:51] build dev started ...
[19:46:51] clean started ...
[19:46:51] clean finished in 6 ms
[19:46:51] copy started ...
[19:46:51] transpile started ...
[19:46:57] build dev failed: Cannot read property 'indexOf' of undefined
[19:46:57] dev server running: http://localhost:8100/

[19:46:57] copy finished in 6.39 s
[19:46:57] watch ready in 6.45 s

@danielehrhardt
Copy link

Hi
This ist a Problem with Firebase. For a temp Solution delete the Firebase.d.ts File in the Firebase folder and everthing should work.

Daniel

@NiltonFelicio
Copy link

NiltonFelicio commented Dec 21, 2016

npm install firebase angularfire2 --save = > NO
npm install angularfire2 --save => YES.
Do not install firebase. Only install AngularFire2, not documented but Firebase is inside AngularFire2. Also when using firebase, you no longer need:
import firebase from firebase ->Do not do it.

My project goes this way without making any mistakes on the console. I hope I have helped.

@mikejshortland
Copy link

Hi, I've started to get this issue on windows 10. I've removed node_modules and ran npm cache clean. I've also checked there is no instance of firebase. I've started a new ionic 2 project based on the tabs template ran npm install and ionic serve and the following is returned:

ionic-app-scripts serve

[08:36:29] ionic-app-scripts 0.0.47
[08:36:33] watch started ...
[08:36:33] build dev started ...
[08:36:33] clean started ...
[08:36:33] clean finished in 34 ms
[08:36:33] copy started ...
[08:36:33] transpile started ...
[08:36:53] build dev failed: Cannot read property 'indexOf' of undefined
[08:36:53] dev server running: http://localhost:8100/

[08:36:54] copy finished in 20.63 s
[08:36:54] watch ready in 20.95 s

If I then edit the main.ts and save the project auto rebuilds and loads fine. If I stop and serve again I get same error and need to edit a file again.

ionic info as follows:
Your system information:

ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed

Has anyone any thoughts on how to resolve this?

@NiltonFelicio
Copy link

Update:
ionic-app-scripts 0.0.47
To:
ionic-app-scripts 0.0.48
npm update @ionic/app-scripts@latest --save-dev

@thomastthai
Copy link

thomastthai commented Dec 22, 2016 via email

@mikejshortland
Copy link

@NiltonFelicio , thanks for the help and Sorry for the delay, After clearing everything out when I run the npm update @ionic/app-scripts@latest --save-dev command I still get version 0.0.47. However after clearing this all out and starting from a tabs template it is finally building again without errors. Thanks Mike

@Tusharbalar
Copy link

same issue here:

Project works fine with ionic 2.0.0-rc.3,
after migrating from version 2.0.0-rc.3 to version 2.0.0.-rc.5 it started giving error.

Also, I tried fresh npm installation still same error occurs.

Error:

build dev failed: Cannot set property 'fileSystem' of null

> ionic-hello-world@ ionic:serve /home/tushar/NxtLifeYugma2
> ionic-app-scripts serve "--v2" "--lab" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"

[13:56:05]  ionic-app-scripts 0.0.45 
[13:56:05]  watch started ... 
[13:56:05]  build dev started ... 
[13:56:05]  clean started ... 
[13:56:05]  clean finished in 3 ms 
[13:56:05]  copy started ... 
[13:56:05]  transpile started ... 
[13:56:09]  transpile finished in 3.97 s 
[13:56:09]  webpack started ... 
[13:56:10]  build dev failed: Cannot set property 'fileSystem' of null
[13:56:10]  copy finished in 4.15 s 
[13:56:10]  watch ready in 4.19 s 
[13:56:10]  dev server running: http://localhost:8100/

Ionic info:

Your system information:
Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.6
Node Version: v4.6.0
Xcode version: Not installed

@MartinMa
Copy link

MartinMa commented Jan 18, 2017

@Tusharbalar Try to update ionic-app-scripts to version 1.0.0 (see devDependencies in package.json). It worked for me.

edit: Have a look at the upgrade instructions for 1.0.0 https://github.com/driftyco/ionic-app-scripts/blob/master/CHANGELOG.md

You need to add sw-toolbox

npm install sw-toolbox --save --save-exact

@Tusharbalar
Copy link

Thanks @MartinMa, after updating to version 1.0.0 I got a new error

[15:49:50]  watch failed: A watch configured to watch the following paths failed to start. It likely that a file 
            referenced does not exist: /home/tushar/NxtLifeYugma2/src/assets/**/*, 
            /home/tushar/NxtLifeYugma2/src/index.html, /home/tushar/NxtLifeYugma2/src/manifest.json, 
            /home/tushar/NxtLifeYugma2/src/service-worker.js, 
            /home/tushar/NxtLifeYugma2/node_modules/ionicons/dist/fonts/**/*, 
            /home/tushar/NxtLifeYugma2/node_modules/ionic-angular/fonts/**/*, 
            /home/tushar/NxtLifeYugma2/node_modules/ionic-angular/polyfills/polyfills.js, 
            /home/tushar/NxtLifeYugma2/node_modules/sw-toolbox/sw-toolbox.js 
[15:49:50]  ionic-app-script task: "watch" 
[15:49:50]  Error: A watch configured to watch the following paths failed to start. It likely that a file referenced 
            does not exist: /home/tushar/NxtLifeYugma2/src/assets/**/*, /home/tushar/NxtLifeYugma2/src/index.html, 
            /home/tushar/NxtLifeYugma2/src/manifest.json, /home/tushar/NxtLifeYugma2/src/service-worker.js, 
            /home/tushar/NxtLifeYugma2/node_modules/ionicons/dist/fonts/**/*, 
            /home/tushar/NxtLifeYugma2/node_modules/ionic-angular/fonts/**/*, 
            /home/tushar/NxtLifeYugma2/node_modules/ionic-angular/polyfills/polyfills.js, 
            /home/tushar/NxtLifeYugma2/node_modules/sw-toolbox/sw-toolbox.js

@vemu
Copy link

vemu commented Jan 18, 2017

@MartinMa, Thank you 👍 Updating ionic-app-scripts to version 1.0.0 worked for me.
@Tusharbalar, If you also have updated sw-toolbox, delete and re install all the new dependencies (might work).

@Tusharbalar
Copy link

Thanks, @MartinMa It works for me.

@g8d3
Copy link

g8d3 commented Feb 1, 2017

For me the output when running has an error saying:

build dev failed: Cannot set property 'fileSystem' of null

Build does not fail when I do:

ionic build android

But it does when I do:

ionic run android -l -p 9999 -r 9998 -c

I am on 0.0.45, how do I update to 1.0.0?

@g8d3
Copy link

g8d3 commented Feb 1, 2017

This solved it for me:

npm install -g ionic
npm install @ionic/app-scripts@latest --save-dev
npm install sw-toolbox

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

No branches or pull requests