NPM issue using React - npm

I currently have an issue where I can no longer work, with a machine that I bought using NPM. The issue does not run using npm start.
david#Davids-MacBook-Pro happy % npm start
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! happy#0.1.0 start: react-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the happy#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/david/.npm/_logs/2020-08-09T06_56_49_544Z-debug.log
This is the main issue. Also have "2020-08-09T06_56_49_544Z-debug.log"
Can anyone help me...
Thanks you,
David
The NPM One
2020-08-09T06_56_49_544Z-debug.log

You are trying to run this from your /Users/david/ directory. You need to navigate to the root of your project (where package.json is), then do npm start:
$ cd path/to/my/project
$ npm start
Update:
Add that babel-eslint package to your package.json.
Show your directory tree inside users/David/happy

Thanks very much. I have finally been able to make NPM work using because there are two different type of sites ~/david and ~/david/happy.
I completely removed the NPM of ~/david, and now only have NPM for ~/david/happy working now.
the issue is
https://github.com/facebook/create-react-app/issues/8781

Related

Got errs with puppeteer and node-sass running npm i

I have a double problem.
The work environment is in Vue and Nuxt, with a mac M1 pro.
Until last week, I had no problems, everything was running perfect. They changed my mac and the world stopped running.
I download 2 repos, but when running npm i, one explodes with puppeteer and the other with node-sass.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! puppeteer#8.0.0 install:nodeinstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer#8.0.0 install script.
npm ERR! code ELIFECYCLE npm ERR! error 1 npm ERR! node-sass#4.14.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass#4.14.1 postinstall script.
I am using the correct version of Node.
I tried deleting the package-lock.json and the node_modules, clearing the npm cache, and running npm i again, and no, it breaks.
I tried installing those specific packages outside of npm i, and I get the same error.
I tried creating a .npmrc file with
registry=https://registry.npmjs.org always-auth=true //registry.npmjs.org/: "token"
I am using the same package.json and the same repos as my peers. They also have mac M1 and have no problem.
On Github we have the same permissions.
Any idea what is happening?
Thank you very much in advance \o/
You can use sass instead of node-sass. This is because node-sass has been deprecated.
npm uninstall node-sass
npm install sass
Works all the same, no need to make any other changes

While upgrading Angular from version 5.0 to 6.1, facing npm Error: Unknown argument: serve

Error: Unknown argument: serve
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-io-example#1.0.0 start: ng serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-io-example#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Please provide some solution for this, as I am stuck, not able to run my Angular application.
Encountered the same problem when setting up my development environment on different machine.
Use npm run serve instead. It worked to me.

I am not able to install npm packages on my vaadin project

happy new year!
Any package that I am trying to install I am getting this:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #rollup/pluginutils#3.1.0
npm ERR! Found: dev #rollup/plugin-typescript#"^3.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev #rollup/plugin-typescript#"^3.0.0" 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 ~/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2022-01-02T16_54_42_026Z-debug.log
I am trying to use this npm install --save #fortawesome/fontawesome-free
I don't understand what could be wrong.
as it said in the error, you are handling an old package dependency and therefore you can use --force, or --legacy-peer-deps
Another solution that worked for me, and I think is better, try to install it through pnpm, as it seems to handle it.
I will guess you have decided to update npm itself recently on your local env.
if you run the following (as per your error message), it should install dependencies without trouble.
npm i --legacy-peer-deps
Running npm v8+ to update your dependencies will upgrade the version of your package-lock.json. The issue is that your repo libraries have many old dependencies which might not be compatible with this update. When you run npm with --legacy-peer-deps it uses the old ways...
I have encountered similar problems. After checking, I found that the primary group permission of the node program home directory is 500.500, which needs to be set to root root
Did you try this :
sudo npm install --save #fortawesome/fontawesome-free

How to install gulp globally

I am trying to istall gulp globally at work computer and find some error
> PS C:\OpenServer\domains\the_witcher_3_wild_hunt> npm install gulp -g
> npm ERR! path \\DOM-PDC\HomeWin7$\ npm ERR! code ELOOP npm ERR! errno
> -62 npm ERR! syscall stat npm ERR! ELOOP: too many symbolic links encountered, stat '\\DOM-PDC\HomeWin7$\'
>
> npm ERR! A complete log of this run can be found in: npm ERR!
> C:\Devel\nodejs\npm-cache\_logs\2019-07-31T08_56_13_632Z-debug.log
Edit:
I have read this related issue and can confirm that no previous version of gulp is installed.
I have also cleared the npm cache by running; npm cache clean --force, however the same problem still persists.
This problem is about "prefix", as it suggest #TripeHound.
If you have similar problem you can find answers here

why does react native form installation give an error?

I tried to install react-native-dynamic-form. Now npm is also not working.
Why isn't it?
PS D:\reactNative> npm install -g react-native-cli
npm ERR! code E405
npm ERR! 405 Method Not Allowed - GET https://registry.npmjs.org/react-
native-dynamic-form/react-native-dynamic-form/react-native-cli
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2019-04-
25T11_13_54_616Z-debug.log
giving error, 405?
Many problems related with npm have some common solutions.
Here is 2 of them:
Try to update npm with command npm update or just npm install - (this one just install's the latest version so this 2 commands are common)
Try to clean Your cache with npm cache clean
Good luck :)