I try to config envirenment for launch tests on js.
Windows10, python 2.7
After input command npm -i I have error message:
I tried to use npm install --global --production windows-build-tools
Try installing the react, if you check closely the error 'npm WARN react-markdown#3.4.1 requires a peer of react#^15.0.0 ...'
npm install react --save
Also, you may try upgrading your react-native install. react-native is as v0.30.0 now
npm update react-native
Related
i am trying to install supertest but in the terminal i get error, when i run supertest -v says command not found. after installing i get below error. any suggestion would be highly appreciated
i tried to install the dependency with using below methods
npm i/install supertest
2, npm i/install --save-dev spuertest
3, npm i/install --save supertest
#MacBook-Pro Node_Cat_Supertest % npm install --save supertest
npm WARN cat_supertest#1.0.0 No description
npm WARN cat_supertest#1.0.0 No repository field.
supertest#6.0.1
updated 1 package and audited 137 packages in 1.355s
37 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
ahmadimranpopal#MacBook-Pro Node_Cat_Supertest %
Regards
IP
have you ever tried it as a root privileges? and got same results? sudo -i
have you ever tried installing as a global package? npm install <module-name> -g
have you ever tried to installing specific version of the package? npm install <module-name>#<version-name>
this is the problem
HP#DESKTOP-1HP83V8 MINGW64 ~/Desktop/Web-Development (master)
$ npx create-react-app my-app
Creating a new React app in C:\Users\HP\Desktop\Web-Development\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache_logs\2020-11-20T11_50_51_060Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts >cra-template has failed.
I've encountered this multiple times.
First I would suggest that you run npm uninstall -g create-react-app since the global version isn't supported anymore.
Then try npx create-react-app my-app again.
If that does not work, try to run:
npm init
npm install create-react-app
npx create-react-app my-app
The steps above have solved the issue for me a couple of times
Disconnect and reconnect to your source of internet (WIFI).
After that, run npm cache verify
Next you will want to run: rerun npx create
Working Solution: thanks to idkwhatsgoingon's answer.
create-react-app does not work globally
npm uninstall -g create-react-app
npm install create-react-app
create-react-app app01
try this command first:
npm cache clean --force
and create your react app again.
I got the same error .Here these things i did to solve it
I ran npm cache clean --force
after again npx create-react-app project name
I tried all of these, it did not work. But I restarted the computer and it started working ! So after clearing the cache etc, might be be worth restarting the machine ( Windows 10 )
I got the same error when trying to install netlify-cli.
Here are two things I did to solve it:
I deleted some files to clear up disk space
Since my npm version is 6.0+, I ran "sudo npm cache verify"
Add the line
timeout=60000
to your .npmrc config file (create it at ~/.npmrc if it doesn't exist)
then run npx create-react-app project-name should be successful. At least it was in my case. (I had code ERR_SOCKET_TIMEOUT before)
Try installing yarn. I did this and immediately fixed my issues.
npm install --global yarn
first and foremost uninstall create-react-app by
npm uninstall -g create-react-app
then
npm cache clean -f
then
npx create-react-app app-name
this worked for me
I run npm cache verify
After this command, I run sudo apt install rerun
Then I run the command rerun npx create-react-app <app-name>
It worked like magic
I'm new to React and I want to create a new component by a command.
The command which I want to create will be the same output of the command in Angular 2: "ng generate component Test".
I have search on the internet and there is a reference: https://www.npmjs.com/package/create-reactjs-component.
However, it doesn't work for me. The terminal shows errors:
PS C:\Users\anhtranv1\Desktop\react-app> npm install -g create-reactjs-component Test
npm ERR! code E404
npm ERR! 404 Not Found: Test#latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\anhtranv1\AppData\Roaming\npm-cache\_logs\2018-10-
29T10_39_16_863Z-debug.log
Is there anyone can give me a command to create a component in react?
Thank you in advanced.
With npm install -g create-reactjs-component you install the npm package globally.
After you installed the package globally with the above command you can create a component with create-reactjs-component YourComponentName.
Please read the documentation of the package, it's all described there.
You might want to check out generate-react-cli. Really straightforward and easy to use.
install: npm install -g generate-react-cli
run: generate-react component Box
That's it
repo: https://github.com/arminbro/generate-react-cli
What are you telling him here :
npm install -g create-reactjs-component Test
Is to install Globally create-reactjs-component AND Test, however there is no Test defined in npm repository,
Install your CLI tool dep
Create your component
While installing native script, I always get this error while executing this command:
npm i -g nativescript
This is the error.
Try the following to start clean and redo the installation:
npm remove nativescript -g
npm cache clear
npm install nativescript -g
I install AngularJs using the command npm install -g angular-cli and afterwards, when I was trying to create new project, I get the following error,
Cannot find module 'reflect-metadata'
What should I for resolve the error ?
I had to reintall nodeJS from their website and install reflect-metadata and portfinder using the following commands while being as superuser,
sudo npm install -g reflect-metadata
sudo npm install -g portfinder
Afterwards, I can create new project using the command,
ng new myProject
Upgrade npm by npm install -g npm.
If problem still exists try:
npm i -g reflect-metadata
Re-installing node.js worked for me.