"babel-node: not found" with react-native - javascript

i getting this type of error while running the other project in my Linux system.
sh: 1: babel-node: not found
npm ERR! code ELIFECYCLE
npm ERE! syscall spawn
npm ERR! file sh
npm ERR! ENOENT errno
npm ERR! react-native-activity-feed-showcase#.1.0 init-data: babel-node scripts/initData.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the init-data script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Related

I can not install npm

So I tried installing npm in the folder but it always threw an error. I tried deleting and installing node, npm chache clean --force but that did not work.
This is the error message:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\sz_da\OneDrive\Asztali gép\css-master/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\sz_da\OneDrive\Asztali gép\css-master\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sz_da\AppData\Local\npm-cache\_logs\2022-11-03T19_13_44_560Z-debug-0.log

NPM Error: Cannot find module 'node-bin-darwin-arm64/package.json' fixes on the internet not working

I tried node V16 and V17 from the website, from n and from nvm with arch. I deleted the node_modules folder, but nothing.
I'm using a M1 macbook pro
Error when running npm i:
npm ERR! code 1
npm ERR! path /Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node
npm ERR! command failed
npm ERR! command sh -c node installArchSpecificPackage
npm ERR! npm ERR! code ETARGET
npm ERR! npm ERR! notarget No matching version found for node-darwin-arm64#16.13.2.
npm ERR! npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! npm ERR! notarget a package version that doesn't exist.
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/redacted/.npm/_logs/2022-02-11T23_06_22_932Z-debug-0.log
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'node-bin-darwin-arm64/package.json'
npm ERR! Require stack:
npm ERR! - /Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node/installArchSpecificPackage.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.resolve (node:internal/modules/cjs/helpers:108:19)
npm ERR! at ChildProcess.<anonymous> (/Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node-bin-setup/index.js:19:27)
npm ERR! at ChildProcess.emit (node:events:520:28)
npm ERR! at maybeClose (node:internal/child_process:1092:16)
npm ERR! at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/Users/redacted/Library/CloudStorage/OneDrive-Personal/Software/Code/Discord-Bots/DijkendamDiscordBot/node_modules/node/installArchSpecificPackage.js'
npm ERR! ]
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/redacted/.npm/_logs/2022-02-11T23_06_18_606Z-debug-0.log
Please help i have tried everything i could find!

npm ERR! errno -4058

I am having this error when starting npm start, it seems that it is not finding the file package.json.
But I'm not sure if that's right, could someone help me?
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Projetos\omnistack\aulas\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Projetos\omnistack\aulas\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Thiago Magalhães\AppData\Roaming\npm-cache\_logs\2020-06-26T22_51_26_639Z-debug.log

An error occurred while following creat-react-app

I want to solve these errors quickly and study. But the search continues and the symptoms continue to appear even though others have tried to do so.
> hello-react#0.1.0 start /Users/kimseungwon/hello-react
> react-scripts start
> npm ERR! file sh
> npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! hello-react#0.1.0 start: `react-scripts start`
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the hello-react#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/kimseungwon/.npm/_logs/2018-09-02T08_28_05_806Z-debug.log
node version: 8.11.4
npm version: 5.6.0
Why is this happening?
You don't need to run the project with react-scripts command, just you should using the npm command as below as you can see in package.json scripts object:
npm run start

NPM: Registry is missing

npm http GET https://registry.npmjs.org/n
npm ERR! Error: failed to fetch from registry: n
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at CleartextStream.<anonymous> (http.js:1137:11)
npm ERR! at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /var/www/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-58-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "n"
npm ERR! cwd /var/www
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: n
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/npm-debug.log
npm not ok
I was trying to update the nodejs installation but i couldn't.
I followed the steps here.
Ok so i have answered my own question.
Aparently sudo apt-get install nodejs directly from the repository would only give you a maximum of v.0.06.
So what i did was the following
https://launchpad.net/~chris-lea/+archive/node.js/
i added the PPA, then did the whole install nodejs again.
Afterwhich, the version is now v.0.10
Hope this would help anyone in my case.

Categories