26

I am trying to run an Ionic 2 Application. I am getting following error on running ionic serve

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

The complete log is as below:

λ ionic serve                                                              

> ionic-hello-world@ ionic:serve D:\ionic         
> ionic-app-scripts serve                                                  

[18:11:23]  ionic-app-scripts 0.0.47                                       
[18:11:24]  watch started ...                                              
[18:11:24]  build dev started ...                                          
[18:11:24]  clean started ...                                              
[18:11:24]  clean finished in 6 ms                                         
[18:11:24]  copy started ...                                               
[18:11:24]  transpile started ...                                          
[18:11:28]  transpile finished in 4.15 s                                   
[18:11:28]  webpack started ...                                            
[18:11:28]  build dev failed: Cannot set property 'fileSystem' of null     
[18:11:28]  dev server running: http://localhost:8100/                     

[18:11:28]  copy finished in 4.39 s                                        
[18:11:28]  watch ready in 4.44 s   
Yuvraj Patil
  • 7,944
  • 5
  • 56
  • 56
  • I'm getting the same issue since today, nuked everything node and still getting it. – Mark Holland Jan 18 '17 at 13:19
  • can you share package.json? – Suraj Rao Jan 18 '17 at 13:31
  • 2
    If you did a recent `npm i -g ionic cordova` make sure to match your package like @suraj suggest. See: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#200-rc5-2017-01-11 – Dalie Jan 18 '17 at 13:38
  • I am also having same issue since last evening. The project was building find till 4 pm yesterday. Looks like this something started since yesterday. Please share the info if you happen to find any solutions. I will also share my findings. – rout0802 Jan 18 '17 at 13:39
  • I did; from RC 4 to RC 5. But that is after I started having this issue in RC4. – rout0802 Jan 18 '17 at 13:44
  • make sure to update ionic app scripts `npm install @ionic/app-scripts@latest --save-dev`. It should be 1.0.0 version – Suraj Rao Jan 18 '17 at 13:49
  • That worked!!! Thanks. – rout0802 Jan 18 '17 at 13:57
  • I'm getting it on RC2, all I did was rm node_modules then npm install and started getting the issue https://github.com/driftyco/ionic-app-scripts/issues/660 – Mark Holland Jan 18 '17 at 13:57

3 Answers3

26

Update your ionic app scripts to the latest version. It is 1.0.0 for RC5 release.

npm install @ionic/app-scripts@latest --save-dev.

As suggested, check the package.json from here.

Run npm install

Sampath
  • 63,341
  • 64
  • 307
  • 441
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • 2
    *and* don't forget to update the package.json *and* run `npm install` again! – Dalie Jan 18 '17 at 14:27
  • great this worked, thanks I was missing the "sw-toolbox": "3.4.0", once I added this to my package.json, Visual studio installed this and it all started working as usual. Thanks a lot – Praveena Jan 19 '17 at 15:15
  • Excellent, Thanks a lot :) – Sampath Jan 31 '17 at 04:27
  • 1
    No problem @Sampath ..:) Wow this seems to be a common problem.. did not expect the answer to attract lot of attention – Suraj Rao Jan 31 '17 at 04:30
0

This worked for me: In your project go to yourProjectname\node_modules\@typesoject

Then install

$ npm install pouchdb @types/pouchdb

You can now use

import PouchDB from 'pouchdb';

as explained here here

sikaili99
  • 532
  • 6
  • 14
-1

I also faced this issue for Ionic2 application.

When i tried to run the application in ripple browser it was telling "You're almost ready! If you're seeing this page, then you still need to install the NPM Task Runner extension for Visual Studio and run this app again. You can download the extension from:".

I struggled a lot to resolve the issue i was using visual studio 2015 Update3.

Finally i got a solution issue was with ionic "@ionic/app-scripts".

To resolve the issue i fallowed the below steps.

1] execute command "npm uninstall -g ionic" in Command Prompt.
2] Update the version of @ionic/app-scripts to 1.1.4 i.e "@ionic/app-scripts": "1.1.4" in package.json file and Save the file.
3] execute command "npm install -g ionic" in Command Prompt. it will give some warning don't need to wary about it.
4] again i have done Restore Packages by right clicking on the packages.json file.
5] next go to view menu in the visual studio and select other windows from there select Task Runner Explorer.
6] Right Click on ionic:build select Binding > Before Build(it will make the all the ionic component to build first before deploying to www directory.

Make sure you have deleted the node_module folder before starting these steps.

That's all everything got set to me application started working fine.

I hope it will help some one.

Second solution is instead black project take sidemenu project even if you fail do the above mentioned steps and restart the visual studio and create new project with sidemenu it will work fine.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
keerthi.rb
  • 91
  • 3
  • 9