Closed IvanLencina closed 7 years ago
[12:40:06] build dev failed: Cannot set property 'fileSystem' of null You're using somewhere the filesystem and try to access it, but it wasn't initialized?
@graphefruit I don't know. It starts happening after try to upgrade. But I just followed the steps of the guide and did nothing else. Before trying to upgrade, I did not give this error.
@IvanLencina For me it looks like you got a code problem and not an ionic problem.
Did you try to start a new project?
ionic start test --v2
and have a look if the issue still exists? If no its something in your codebase.
@graphefruit Yes, if I create a new project, it works. But I don't know how to retrieve my proyect. I have been developing it for about 2 months and everything worked correctly until a moment ago that I wanted to upgrade to take advantage of the improvements they made.
@IvanLencina Just search in your project for "fileSystem", "FileSystem" or something like this, I think you have a variable like:
let fileSystem:any;
And you try to access this variable. Check if you initialize it before you access it.
@graphefruit I searched "fileSystem" in my project and as far as the code I wrote, there is nothing called fileSystem. All the search results that the editor throws me, come from files that are within node_modules.
This error is not an error of my code, I assure you. Rather it is a problem that arose in some node module, after updating. Or, something weird happened during the update process.
So maybe reinstall your ionic plugins (maybe you got there a filetransfer plugin which is outdated?)
Also delete your npm_modules and go into command and write: npm install
- in same folder.
All the problem started when I wanted to use network-plugin.
It result has changed some functions in a later version. So I wanted to upgrade myionic-native
version.
So I did it:
npm rm --save ionic native
npm install --save ionic-native@latest
npm update
It comes to see this error: ctorParameters.map is not a function
in browser console.
So I tried to upgrade to 2.0.0-rc.4 (2016-12-15), following these steps here and upgrade ion-app-scripts to 0.0.47
And then I started to have this problems:
Browser:
GET http://localhost:8100/build/main.css (index):33
GET http://localhost:8100/build/main.js (index):45
GET http://localhost:8100/build/main.js 404 (Not Found)(index):45
And terminal:
[12:40:06] build dev failed: Cannot set property 'fileSystem' of null
I hope I have explained my self better now
@graphefruit Mmm can be. I'm using the FileTransfer plugin. It may be giving a problem to have been outdated with respect to the new version of ionic
I'll try in a little while
Can you update your package.json? Your dependencies should look like:
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.7",
"ionic-angular": "2.1.0",
"ionic-native": "2.4.1",
"ionicons": "3.0.0",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "1.1.3",
"typescript": "2.0.9"
},
If not, change them, and delete and reinstall the node_modules.
@graphefruit This is my entire package.json:
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.7",
"angular2-fullcalendar": "^1.1.1",
"angularfire2": "^2.0.0-beta.6-preview",
"firebase": "^3.6.4",
"ionic-angular": "2.0.0-rc.4",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"jquery-ui": "^1.12.1",
"rxjs": "5.0.0-beta.12",
"soundcloud": "^3.1.2",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.47",
"typescript": "2.0.9"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"description": "Mindfulness: An Ionic project"
}
Ionic-Native and your ionic-angular are some versions behind, aswell as your app-scripts, first update them to the latest
Ionic-Native already has now 2.5.1
Delete then your node_modules and npm install
@graphefruit I updated: "ionic-angular": "^2.1.0", "ionic-native": "^2.5.1",
Erased node_modules folder and npm install
But the problem persist :/
And app-scripts? 0.0.47 is a long way back ;)
@graphefruit Yes, sorry haha. I updated app-scripts to 1.1.3 and now it's working again!!! :D
So, now I will can do: ionic run --prod
Thank's again. Problem solved!
Good! So ;) we're ready to close. Have a nice evening
Thank's, same for you :)
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
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 => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
I've tried to update to rc4: 2.0.0-rc.4 (2016-12-15)
I used the update guide and then, console throws me:
So I searched it, and I found this issue . I did these steps, and then when I do:
ionic serve --watch
, the app is no loading and the browser console throws:And terminal throws:
Relevant information:
Please, help :(