I'm having this problem when trying to install React, can anyone please help me?
C:\Users\MyName>npm install react --save
npm WARN npm npm does not support Node.js v16.13.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mikok\AppData\Roaming\npm-cache\_logs\2022-01-08T13_47_27_192Z-debug.log
Uninstall NPM and install the latest version of Node. The current version, not LTS on the website.
Go to C:\Users\UserName\AppData\Roaming and delete the "npm" and "npm cache" folders.
On your command prompt, run "npm cache clean --force".
Then run "npx create-react-app#latest your-app-name" or "npx create-next-app#latest your-app-name" depending on you preference.
npm uninstall -g npm
or
Uninstall Node from your program files.
Related
I have just created a new laravel application to implement a chat app.
I wanted to scallfold the application using bootstrap but am getting this error :
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/33998 - Not found
npm ERR! 404
npm ERR! 404 '33998#*' is not in this registry.
npm ERR! 404
How can i solve it?
I tried running composer update to see if im missing some dependencies.
I was wrong.
I also runnpm install && npm run devit still did not work
Try to run these commands:
npm config set registry http://registry.npmjs.org
npm -g install npm
npm cache clean -f
After that try to run your project with:
npm run dev
This error is just because of the package 33998 could not be found in the npm registry.
For solution you need to install bootstrap package in your application manually.
For installing BootStrap Use
npm install bootstrap
Also clean the cache of npm forcefully by
npm cache clean --force
Also check the latest npm version and update it if it was to old.
npm -v
npm install -g npm
I was trying to create a react project using the command
npx create-react-app chat-app
But I am getting this error.
Creating a new React app in /home/mikhil/react-tutorial/internshala-react-course/chat-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! npm ERR! Found: #babel/core#undefined
npm ERR! node_modules/#babel/core npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #babel/core#"^7.0.0-0" from #babel/preset-env#7.13.10
npm ERR! node_modules/#babel/preset-env
npm ERR! #babel/preset-env#"^7.12.1" from #svgr/webpack#5.5.0
npm ERR! node_modules/#svgr/webpack
npm ERR! #svgr/webpack#"5.5.0" from react-scripts#4.0.3
npm ERR! node_modules/react-scripts
npm ERR! react-scripts#"*" from the root project
npm ERR! npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/mikhil/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mikhil/.npm/_logs/2021-03-18T11_58_50_255Z-debug.log
Aborting installation. npm install --save --save-exact --loglevel
error react react-dom react-scripts cra-template has failed.
Deleting generated file... package.json
Deleting chat-app/ from /home/mikhil/react-tutorial/internshala-react-course
Done.
You can try to update npm with npm update and see if that fixes it, and if not you can try these steps.
If you've previously installed create-react-app globally via npm install -g create-react-app, it is recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.
You will also want to delete your remnant files and folders for chat-app
Once you are in the /home/mikhil/react-tutorial/internshala-react-course directory and you have removed the global installations you can try running these commands.
npx create-react-app my-app
cd my-app
npm start
Create React App - Getting Started
I was having the same issue with NPM version 7.20.0.
Simply install an older version of NPM.
In the terminal run: npm install npm#6.14.11 -g
There appears to be some particular versions of NPM that cause this issue. Try updating to the very latest version of NPM.
I was also trying to do the same the whole day, then at last I have to open the documentation, there it was mentioned that you can also create react app using
npm init create-react-app **app_name**
and it worked for me fine.
I was troubled very much by this dependency thing.
I want to install babel(windows). but I got error.How can I fix this?
Staff ~/Desktop/react
$ npm install --save-dev babel-core babel-loader babel-present-react
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/babel-core failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Staff\AppData\Roaming\npm-cache\_logs\2019-07-05T09_55_48_364Z-debug.log
First of all Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments.
so first you need to install node js then install npm package manager.
then install babel with this: npm install --save-dev #babel/core #babel/cli
or if you want to install react you can use "npm Create-React-App" is an officially supported way to create single-page React applications. by facebook
When I attempt to install the IBM Mobile First CLI (mfpdev-cli), I'm getting an error.
Command:
npm install -g mfpdev-cli
Error details:
npm ERR! path /Users/timothy/dev/project/mdo-windows-support/package.json
npm ERR! code ENOPACKAGEJSON
...
npm ERR! package.json npm can't find a package.json file in your current directory.
It looks like it's trying to create an npm named 'mdo-windows-support' locally, but it fails. Any suggestions?
npm version: 5.0.1
node version: v8.0.0
Okay, it turns out that the versions of npm/node were the culprit. I switched back to the LTS version of Node, and it worked.
I have been trying to install blur-admin via (git clone https://github.com/akveo/blur-admin.git). But when I install it from git bash as mentioned in the installation guide it shows the following error:
bower ECONFLICT Unable to
find suitable version for angular
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! blur_admin#1.2.0 postinstall: bower install npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the blur_admin#1.2.0 postinstall
script 'bower install'.
npm ERR! This is most likely a problem with the blur_admin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get information on how to open an issue for this
project with:
npm ERR! npm bugs blur_admin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm ERR! npm owner ls blur_admin
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\blur-admin\npm-debug.log
The issue is because Bower is not installed in your Windows Machine.
Try to install bower before installing this AngularJs template.
Use the following command to install bower:
npm install -g bower
Also check if Gulp - Task automation tool is install or not.
Use the following command to install the same:
npm install -g gulp
Now use npm install to install the project and its Package Dependencies.
To run the application:
gulp serve
Sorry I got a little bit late.
Did you try to move the /bower_components/ folder from the /client/ directory to your root project directory? That worked for me.
First
npm i -g npm
Then delete everything in node_modules. When those are deleted, cd to your directory and
npm install
Worked for me. If you are on OSX or Linux, use sudo.
If you are on Windows, make sure you're running as administrator.
The issue is from Bower, as Bower is not installed into the system.
First install the bower by following:
npm install -g bower
Then run the app by :
gulp serve