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

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 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.

Related

Node cannot find path in node_modules / 'react-scripts' is not recognized as an internal or external command

I'm on windows 10
When I run:
npm run start
or
npm start
I get an error:
npm start
> app-test#0.1.0 start
> react-scripts start
'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
What I already tried:
npm ci
remove node_modules and reinstall project
npm audit fix
run command from elevated PowerShell (as admin)
Uninstall Node v.18 win NVM and reinstall common Node installation LTS v.16
Check if react scripts is on dependencies section in package.json - and it's of course there.
Recreate project itself and also create a fresh new React project with npx create-react-app
Clearing npm cache
Nothing's helped me.
BUT This project runs fine WHEN I explicitly tell the node path to subfolder with a script:
app-test> node node_modules/react-scripts/scripts/start.js
Compiled successfully!
You can now view app-test in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.91.1:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
webpack compiled successfully
What's interesting that an old React projects also resided in the parent folder starts normally even I renew node_modules in these projects doing them npm i or npm ci
But any time I try to create and start new React app command npm start fails
UPD1: Tried to create-react-app on any other drive or folder. And it's running ok.
So culprit seems permissions policies in my common working directory ?
UPD2:
I resolved a problem though still have no clear idea who was actually the really culprit of this bug.
I copied all my parent developer folder with all code examples to another drive, then tried to create react app there and out of the blue it worked fine at then new location.
Also I removed this original folder from the drive where it used to be. And do git clone "..." at this directory< recreating the exact structure as it was before all experiments.
Then I tried create-react-app exactly at that location as I've unsuccessfully tried before swapping folders and it was OK !
Tried couple of time with different folder location within parent directory and all sill working fine now !
I remembered now I already have such bug before. And I had to reinstall Windows that time.
I also want to mention that I also have another machine with Windows, another one with Linux and had also laptop with an OSX so I can ( or could) push to this very git repository from any of these computers.
Suggestion of somebody who have any idea, why this bug was happening repeatable would be highly appreciated.
Thanks.

WebStorm not running project, Command `start` unrecognized

I'm very new to React Native, barely two weeks into it. I've installed node.js (ver 10.15.0), I've also installed yarn and downloaded WebStorm.
The problem is that I can't run a simple project created by WebStorm, it throws an error
Command start unrecognized. Make sure that you have run npm install and that you are inside a react-native project.
I've cd into my WebStorm projects folder and run npm install in command prompt countless times but it's still throwing the error. Some online suggestions said I should set my path correctly, but I don't really know how to go about it.
Any help will be appreciated.
You should know The best IDE for react native is VSCode (visual studio code) and don't create project with IDE (you should use commands for create project. just use IDE for manage codes)
use CMD or PowerShell (Recommended) for commands
Create a folder for your project and in the project directory run this commands :
npm install -g expo-cli
expo init Yourprojectname
cd Yourprojectname
npm start
For run android project
react-native run-android
For run android project
react-native run-ios
Also its better to read this tutorial : https://facebook.github.io/react-native/docs/getting-started

React native with expo: ‘react-navigation does not exist in the haste module map’

I’m a beginner working on my first app with react native and expo. I’m having trouble getting the navigation to work. When I run the app, I get the error ‘react-navigation does not exist in the haste module map’. I’ve installed react navigation through the command line and ran install npm to install dependancies.
I also had the same problems few weeks back , please follow the steps below :
Open terminal and navigate to project root directory.
write 'rm -rf node_modules' in the terminal to remove the node modules.
write 'npm install' in order to install the node modules again
write 'cd ios'.
write 'rm -r build' to clear the old build.
come back to the root folder of project again and run the project.
Your code will run smoothly.

React and Bootstrap4 issue when creating application using create-react-app

I am using Windows 10. Follwoing are the two scenarios where I faced problems. I created applications using create-react-app command. I installed create-react-app using command npm i -g create-react-app#1.5.2
Scenario 1
I stopped react server which was running using npm start command. Then I installed bootstrap using npm i bootstarp#4.1.1 and then I tried to run command npm start but rathern than starting the server, it has given an error 'react-scripts' is not recognized as an internal or external command.
The application is working perfactly before I stopped the react server and installed bootstrap.
Steps to recreate the problem:
create-react-app demo
cd demo
npm start (loaded the application in browser with home page)
stopped the server using Ctrl + C (break)
npm i bootstrap#4.1.1
npm start (giving error 'react-scripts' is not recognized as an internal or external command)
Scenario 2
I installed bootstrap in running react server using another command window / visul studio command line using npm i bootstarp#4.1.1 and when I imported bootstrap file in index.js and saved the file. It have given error
./node_modules/style-loader/lib/addStyles.js
Module build failed: Error: ENOENT: no such file or directory, open 'D:\react\demo2\node_modules\style-loader\lib\addStyles.js'
Steps to recreate the problem:
create-react-app demo
cd demo2
npm start (loaded the application in browser with home page)
Open another command window and reached to location demo4 folder
npm i bootstrap#4.1.1
open index.js in src folder and write: import 'bootstrap/dist/css/bootstrap.css';
save the file and error comes.
I've found many topics about this issue:
https://github.com/facebook/create-react-app/issues/1627
https://github.com/facebook/create-react-app/issues/2436
'react-scripts' is not recognized as an internal or external command
I think that it is related to the npm version that you use. It seems that npm doesn't install all the required dependencies.
Try to run npm update in order to update the dependencies. After this, npm start should work fine:
npm update
npm start

Ember Engine Uncaught Error: Could not find module ember-views/views/select

Created new app with
ember new app-name
version: 1.13.13
node: 5.5.0
npm: 2.14.10
os: linux x64
After running
"ember s"
App works proper in browser
As per guide at https://github.com/dgeb/ember-engines for running ember engine ran below command
ember install ember-engines
rm -rf bower_components
bower install --save ember#canary #Choosed ember#canary from prompt
bower install
And now when i do "ember s" app gets compile properly in CLI but app gets crash in browser and i see nothing in browser.
In console i see below error message
Uncaught Error: Could not find module ember-views/views/select
Tried debugging it, Could not find solution. Is i am missing somthig basic here ?
Note :: I am new to ember. I think this would be small one but could not find solution on web as well.
Sorry about that! There were a few commits/fixes on master that hadn't been released yet.
I just released v0.2.1 which should clear this up for you.

Categories

Resources