With lots of issues while installing react.js finally when I thought that issues were resolved and everything is in a good place. I found this as a heartache issue.
Error description Image for reference:
Whenever you see this error, it means that something went wrong when you installed the dependencies.
The proper method to fix this error and install all the dependencies again can be found in this answer.
A quick workaround can be to install this specific dependency again using the following npm command:
npm intall react-scripts start
This will help you solve this issue. I still recommend you to install all the dependencies again so that you won't run into such issues later on.
Please mark this answer as accepted if it solves your issue.
Please execute the below-mentioned command.
npx i -g create-react-app
It takes few minutes and displays a message similar to below
We suggest that you begin by typing:
cd your-app-name
yarn start
Happy hacking!
cd into the your-app-name folder and execute npm start
Additional Reference: https://reactjs.org/docs/create-a-new-react-app.html
Related
Good Evening All! Hope today was great coding day for everyone. Quick question..
After running the “npx create-react-app” command I get the following error message in my terminal
Cannot find module ‘./internal/Observable’ Require stack:
/Users/FInnocent/node_modules/rxjs/index.js
/Users/FInnocent/node_modules/inquirer/lib/ui/prompt.js
/Users/FInnocent/node_modules/inquirer/lib/inquirer.js
/Users/FInnocent/node_modules/create-react-app/createReactApp.js
/Users/FInnocent/node_modules/create-react-app/index.js
I’m running version v12.16.2 of node and 6.14.4 of npm.
I’ve tried searching for this error in StackOverlow but no luck. I also tried to install this module by running
npm install ./internal/Observable” and get the following error:
npm ERR! Could not install from “internal/Observable” as it does not contain a package.json file.
Any ideas on what’s wrong and how I can fix it?
Found a solution actually, I ran the following
npm install rxjs
And i’m all set now
I've been using create-react-app to make some projects in react and also for practicing, and usually the way to run the project is to use the command npm start from the root directory of that project in the terminal. This has since stopped working for both my old projects which I haven't touched or completely new ones, and followed the exact instructions given by the error already to no effect.
An image of the error, the very top of the terminal is immediately after the npm start command:
I have been googling this over the past two days and I simply can't figure it out. I'm hoping someone with better knowledge would know the root of why npm start has stopped working. Please keep in mind that I already tried the suggestions provided by the error in the terminal.
What's really mind boggling is I haven't changed pcs or done any editing in the old projects such as the one in the picture above, re-installed a bunch of stuff I thought might have been causing issues like npm or babel but they simply don't launch anymore.
Also almost forgot the error log, which has been even more confusing to figure out or google:
You have problem with your dependencies. Please run
npm i
inside project directory.
As your console shows, you can try
remove your node_modules directory
delete file package-lock
I suggest clean npm cache (npm cache clean -f)
and reinstall node_modules using
npm i
There are many reasons to cause this problem.Some suggestions here:
1.uninstall babel-loader and create-react-app globally
npm uninstall -g babel-loader
npm install -g create-react-app
2.remove the error package
rm -rf ~/node_modules/babel-loader
3.stop all the command then clean up the cache of npm
I'm currently learning React. Every time I write create-react-app my-app, I get -bash command not found.
I've tried every single solution out there and still not working. Can anybody please help me? It's very frustrating.
Have you installed the creat-react-app CLI?
npm install -g create-react-app
If bash can't find it, you may just need to install it globally (-g) before you try to use it.
I am trying to install Underscore typings but getting error
Unable to find "underscore" ("npm") in the registry. Did you want to try searching another source? Also, if you want contribute these typings, please help us: https://github.com/typings/registry
I have tried different switches based on my research and solutions provided by others as you can see in image.
Please let me know if I am doing something wrong.
The core issue was a permission issue on my Mac. Your user account need to own your npm install directory.
Then you can run the command:
typings install dt~underscore --global --save
You should not see any more errors.
Below command is works for me,
typings install dt~underscore --global --save
Reference - GitHub Link
This is more recent as of April 2017
npm install --save #types/underscore
my problem is described in the following image:
The main problem is that im getting a: Bower ENOENT no bower.json present error and as you can see in the image (second command) the file is actually present. So ive been trying to find what actually bower install does and havent found it in the NPM documentation and Git documentation as well
Also, in the research ive done some forums suggest installing bower globally and it hasnt worked
Since i've been googling for about 3 nights looking for somebody with the same problem and havent found anybody else with the problem I started wondering about if I changed any environment variable. So i uninstalled node.js and Git and then reinstalled both programs without any change in the result
Hope somebody can help me with this, thanks in advance
Bower is a package manager for HTML http://bower.io/. 'bower install' will download all the packages listed in bower.json and add them to a folder called 'bower_components'
You must have bower install globally via
npm install -g bower
To get a list of NPM packages installed successfully global use:
npm list -g
Having a look at the github issues of that Repository(Angular-phonecat) theres alot of issues related to bower(https://github.com/angular/angular-phonecat/search?q=bower&type=Issues&utf8=%E2%9C%93), which is strange because bower is not that complicated. Have you looked through any of those fixes.