How to fix ENOENT Error while installing React in WSL - node.js

I am trying to create a react app via WSL(windows subsystem for Linux), I am new to this technology, I am trying to create app in my D drive(/mnt/d). I have installed node using NVM, and it is working. But when I try to create an app using npx create-react-app I am getting ENOENT error, I was have been searching all over the internet from last day no luck so far, can anyone have a solution or show me what I am doing wrong. Attaching the error screenshot:

npx can be a bit weird around getting correct working directory context right. Try installing create-react-app globally ( npm i -g create-react-app ). Then try running it without npx.

Related

create-react-app ; aborting installation while creating react app in windows 11 after installing node js

I installed node js and create-react-app in my system and while performing the command to create the startup react project, i performed, npx create-react-app <projectname> command. But it failed all the time and i don't know how to proceed with this and i tried some of the already available solutions and nothing worked and i don't know how to proceed with this. I have attached the screenshot of the error. Have a look at it and help me with the solution.
create-react-app_click_here_to_see_my_terminal_image
Thanks in advance !!!

issues running npm/npm to create a react app

Hi guys im fairly new to coding, im having trouble with node npm, specifically creating a react app.
When i run npm init, it works but not npm/npx creat-react-app. i have even tried just running create-react-app just to see if it might work.
I have installed nodejs and pasted the path in my environment variables. i have tried npm, npx but no luck.
The error im getting is "npm ERR! code ERR_OSSL_PEM_NO_START_LINE"
"npm ERR! error:0909006C:PEM routines:get_name:no start line"
What could the issue be?
Its the first time i come across this issue.
Please help!!
Try
npm set registry http://registry.npmjs.org/
and again
npx creat-react-app my-app

Getting started with Create React App - "Cannot find module"

I'm using the "Getting Started" guide because I've been experiencing endless errors trying to create a react app so far when following tutorials.
And straight away I'm running into a problem. When I run npx create-react-app my-app I get the following:
Cannot find module 'C:\Users\Aristophanes\node_modules\create-react-app\index.js'
Can anyone advise me what I'm doing wrong? Thanks.
This must be a problem related with your node installation (maybe you removed manually create-react-app package?). I'd recommend following these steps:
Uninstall node and npm
Delete the npm cache and npm modules in your machine (In Windows machine you can usually find them at C:\Users\ {username} \AppData\Roaming\npm-cache and C:\Users\ {user name} \AppData\Roaming\npm) respectively.
Install node and npm again
If you really don't want to delete node and npm, try step 2 and see if that works. Following these steps did the job for me, hope that helps you.
I think you might miss installing Node and npm in your machine.
I had same issue a few times. Every time I was searching thru net for a solution, and for every time i just typed in terminal
npm i node
and its just started working

error Couldn't find package "#jest/environment#^24.5.0" required by "#jest/reporters#^24.5.0" on the "npm" registry

I'm completely new to React Native and I'm following Facebook's tutorial at https://facebook.github.io/react-native/docs/getting-started using React Native CLI.
Yesterday, I've created a project successfully. Today, when I create an empty folder and run react-native init AnotherProject I get:
error Couldn't find package "#jest/environment#^24.5.0" required by "#jest/reporters#^24.5.0" on the "npm" registry.
What am I doing wrong? I'm on npm 6.7.0 and node 11.12.0.
Weird. I've ran the exact same command again, and it worked.

Could not find module 'json-schema' while installing angular cli using npm

I am getting this error:
I am not able to install the angular cli using npm. I am getting the "cannot find module 'json-schema'" error. I tried reinstalling the node js and npm with the latest versions. But the error didn't resolve. Please help me with this.
This issue has a fix in the link below:
https://github.com/kriszyp/json-schema/issues/29
Good Luck
I uninstalled and installed node/npm/angular-cli many times. Finally did a "where ng" on my windows pc, and found the executable was under the %appdata%\npm directory. So after uninstalling node, deleting the %appdata%\npm directory, reinstalling node, and 'npm install -g angular-cli', the ng new and ng serve commands started working.

Resources