简体   繁体   中英

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

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   

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

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

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 ie "@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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM