Closed biesbjerg closed 7 years ago
@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.
@uzumakinaruto123 Thanks, but I'm already on app-scripts 0.0.45, and I'm not using firebase :/.
@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
There's a lot more info at #468
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.
the same issues and nothing appear on the screen!
It seems like the indexOf
null pointer is swallowing a legitimate error. I'll investigate and fix in the coming days.
Thanks, Dan
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
If you take a look at this comment on https://github.com/driftyco/ionic-app-scripts/issues/468#issuecomment-263661409 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.
Something new?
@danbucholtz Problem is still here in 0.47
Can someone provide a concrete reproduction? I have still been unable to recreate.
Thanks, Dan
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);
@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
2) Add a reference to firebase in any page and save:
import * as firebase from 'firebase';
3) ionic will build and serve as normal and the app will work normally in the browser.
4) now close ionic serve (cntrl+c)
5) now re-run ionic serve and the error msg should pop up:
build dev failed: Cannot read property 'indexOf' of undefined
6) 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.
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
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
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.
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?
Update: ionic-app-scripts 0.0.47 To: ionic-app-scripts 0.0.48 npm update @ionic/app-scripts@latest --save-dev
That worked for me. Thank you!
On Wed, Dec 21, 2016 at 7:52 AM, Nilton Felicio notifications@github.com wrote:
Update: ionic-app-scripts 0.0.47 To: ionic-app-scripts 0.0.48 npm update @ionic/app-scripts@latest --save-dev
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/driftyco/ionic-app-scripts/issues/340#issuecomment-268557284, or mute the thread https://github.com/notifications/unsubscribe-auth/APxEZWKWR2RpqEs6z2bCIuABhhVnVAOVks5rKUslgaJpZM4KuBS8 .
@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
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:
> 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
@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
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
@MartinMa, Thank you :+1: 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).
Thanks, @MartinMa It works for me.
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?
This solved it for me:
npm install -g ionic
npm install @ionic/app-scripts@latest --save-dev
npm install sw-toolbox
Short description of the problem:
ionic serve
fails:Steps to reproduce:
ionic serve
Which @ionic/app-scripts version are you using? 0.0.42
ionic info
:Complete
package.json
:EDIT: Ping @danbucholtz ;-)