Edit
I ended up upgrading the iOS version and running iterm2 using rosetta and the pod install finally worked. I was also using npx pod install when I should of just used cd ios/ && pod install
Original
I am setting up a new laptop and finally got around to building my React native app again and am running into an issue with npx pod install.
npx pod install
Need to install the following packages:
pod
Ok to proceed? (y) y
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated chokidar#1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated mkdirp#0.3.5: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated mkdirp#0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated connect#2.30.2: connect 2.x series is deprecated
npm WARN deprecated coffee-script#1.8.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated core-js#1.2.7: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/myuser/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/myuser/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2'
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! /Users/myuser/.npm/_logs/2021-11-11T00_43_21_277Z-debug.log
When I go looking in these npx directories they never have anything in the node_modules.
Looking at the pod package.json file, it appears to have a dependency on pm2 being installed in the module's own node_modules directory but that's not how npx does things. So that's why you're getting ENOENT (which is basically "path not found") for the pm2 module as your error message.
The easiest solution is probably to not use npx with pod but to instead do as the README instructs and install pod as a global package with npm install -g pod. Then run pod install instead of npx pod install.
Related
After a clean Gatsby 5.2 install using the Gatsby CLI, I need help understanding my terminal output, which shows a multitude of NPM WARN flags.
I have three questions;
What is the cause of these errors?
Why are these errors happening with a clean install?
What is the preferred method for resolving issues like these?
I'm asking these questions here on S.O. because I'd like to pre-emptively learn how to understand and deal with them correctly.
I read up on some similar questions here on S.O., and some recommend using the --legacy-peer-deps flag.
I understand why someone might use the --legacy-peer-deps flag in general, but I'm struggling to understand why a new release, I.e. (Gatsby 5.0), needs to use the --legacy-peer-deps.
NPM errors are still a pain point for me, so I'm looking for easy-to-understand reading material. Or a well-rounded explanation if possible.
After running: gatsby info --clipboard
% gatsby info --clipboard
System:
OS: macOS 13.0.1
CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU # 3.20GHz
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Browsers:
Chrome: 108.0.5359.98
Safari: 16.1
npmPackages:
gatsby: ^5.2.0 => 5.2.0
gatsby-plugin-image: ^3.2.0 => 3.2.0
gatsby-plugin-manifest: ^5.2.0 => 5.2.0
gatsby-plugin-sharp: ^5.2.0 => 5.2.0
gatsby-source-filesystem: ^5.2.0 => 5.2.0
gatsby-transformer-sharp: ^5.2.0 => 5.2.0
npmGlobalPackages:
gatsby-cli: 5.2.0
%
The expected result after running: npm i
% npm i
removed 1505 packages, and audited 83 packages in 8s
20 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
%
Actual result after running: npm i
% npm i
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN Found: react#18.2.0
npm WARN node_modules/react
npm WARN react#"^18.2.0" from the root project
npm WARN 10 more (react-dom, gatsby, gatsby-plugin-image, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#5.2.0
npm WARN node_modules/gatsby
npm WARN
npm WARN Conflicting peer dependency: react#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react
npm WARN peer react#"0.0.0-experimental-c8b778b7f-20220825" from react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825
npm WARN node_modules/react-server-dom-webpack
npm WARN react-server-dom-webpack#"0.0.0-experimental-c8b778b7f-20220825" from gatsby#5.2.0
npm WARN node_modules/gatsby
npm WARN deprecated async-cache#1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
added 1505 packages, and audited 1588 packages in 1m
325 packages are looking for funding
run `npm fund` for details
15 moderate severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
%
So after some time digging around online, I ended up piecing my answer together and in summary;
I learned that Gatsby explicitly asked for an experimental build of react-server-dom-webpack. After looking at the package.json file located within node_modules/react-server-dom-webpack.
After checking the official repo online for react-server-dom-webpack, I noticed that the package.json file is currently configured differently. (See the official package.json file)
I still couldn't understand why Gatsby explicitly asked for an experimental build of react-server-dom-webpack. So I folded and decided to raise an issue in the official Gatsby Repo. (Link to Issue).
The Answer
For Partial Hydration, Gatsby currently has to use an experimental version of react-server-dom-webpack that sets an experimental version of React as a peerDep.
Until Gatsby has fixed this and you want to remove this warning you can add this to your package.json to tell npm which dependency version to use:
"overrides": {
"react-server-dom-webpack#0.0.0-experimental-c8b778b7f-20220825": {
"react": "^18.2.0"
}
}
Link to comment in github where I found this fix.
I am trying to install vue3 js. but unfortunately I am getting an error please help me how can i resolve ? thanks.
developer#developer-ThinkCentre-M93p:~$ npm install -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! Unexpected end of JSON input while parsing near '...8HIwwH2SLKEsPpZqiiIW8'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/developer/.npm/_logs/2021-01-27T02_11_15_446Z-debug.log
install vue-cli if you haven't yet
sudo npm install -g #vue/cli
OR update to latest
sudo npm update -g #vue/cli
then create a new project with
vue create hello-world
then select vue 3 project
Including comment from #Eazash:
You need to verify your npm cache with npm cache verify and then try installing vue-cli. If that doesn't work, try clearing the cache altogether with npm cache clean --force
could also try with sudo privileges: sudo npm cache verify and sudo npm cache clean --force
Newbie here, I am trying to install vue cli for frontend development with npm, but it is throwing an error.
Here is the output of sudo npm install -g #vue/cli
[18:00 vue]$ sudo npm install -g #vue/cli
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
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! /root/.npm/_logs/2021-01-18T13_06_37_662Z-debug.log
Here is a complete log
I tried with and without sudo, the same error.
My machine runs Manjaro KDE 20.2, npm version 6.14.9, node v15.4.0. I have tried:
retrying to see if it works this time
sudo npm cache verify and sudo npm cache clean --force
removing /usr/lib/node_modules
reinstalling node and npm
anything else i found on the internet
I'm stuck on this error for a few days, any help is appreciated.
It's interesting that it works without -g flag, installing to current folder, but I can't figure out how to use vue command then.
Okay, i removed that Manjaro, and grabbed the latest version of ubuntu, this solved my problem, will never install Manjaro again.
I'm using the command 'npm -g install parcel-bundler', to install parcel globally and get no error, but then it doesn't seem to be installed.
When i run the command 'parcel --version' i get 'command not found', same for any other 'parcel' commands. I've tried running the 'install' command again and I get a 'parcel-bundler#1.12.4
updated 2 packages in 20.003s'. i have several 'deprecated' warnings, could the problem come from that ?
here they are :
npm WARN deprecated core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native#1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
/Users/user.npm-packages/bin/parcel -> /Users/user/.npm-packages/lib/node_modules/parcel-bundler/bin/cli.js
Thanks
EDIT : I have tried updating all the deprecated items manually and re-installing Parcel, it didin't fix the problem.
Recently I encountered the same problem and while I don't fully understand why this happens, I manage to find some workarounds to run parcel:
After installation using npm, run the same commands but adding npx before them, for example, I create a server through npx parcel index.html;
Install it using yarn (yarn add parcel-bundler) and then, for example, run a server (yarn parcel index.html). Same deprecated warnings here but they don't prevent the package from running;
Update: if install the package locally there are even more ways.
You can do what npx does under the hood: ./node_modules/.bin/parcel --version;
Create custom shorthand command in package.json. Under scripts object add "server": "parcel index.html". The part before colon can be named anything you like. After that run npm run server and this would work.
I was working on a Quasar project on my windows machine and out of blue it is saying quasar is not recognized as an internal or external command.
I tried to uninstall quasar-cli with the command npm uninstall -g quasar-cli but it seems it is not working. npm list -g --depth=0 command tells me that I still have the quasar-cli.
C:\Users\nitin>npm uninstall -g quasar-cli
up to date in 0.028s
C:\Users\nitin>npm list -g --depth=0
C:\Users\nitin\AppData\Roaming\npm
+-- #quasar/cli#1.1.0
+-- cordova#9.0.0
+-- nodemon#2.0.4
`-- vue-cli#2.9.6
I am also not able to install it again as it gives the following errors
C:\Users\nitin>npm install -g quasar-cli
npm WARN deprecated #babel/preset-stage-2#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated chokidar#2.0.4: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated #babel/preset-stage-3#7.0.0-beta.54: � We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated joi#11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated topo#2.0.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN rollback Rolling back is-descriptor#1.0.2 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\node_modules\define-property\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules\quasar-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN notsup Unsupported engine for watchpack-chokidar2#2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.17.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2#2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\quasar-cli\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ajv-keywords#3.5.1 requires a peer of ajv#^6.9.1 but none is installed. You must install peer dependencies yourself.
npm ERR! code EEXIST
npm ERR! path C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar
npm ERR! dest C:\Users\nitin\AppData\Roaming\npm\quasar
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\nitin\AppData\Roaming\npm\node_modules\quasar-cli\bin\quasar' -> 'C:\Users\nitin\AppData\Roaming\npm\quasar'
npm ERR! File exists: C:\Users\nitin\AppData\Roaming\npm\quasar
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\nitin\AppData\Roaming\npm-cache\_logs\2020-07-19T04_24_31_029Z-debug.log
Can you please suggest where am I going wrong. I am new with npm and JS in general so please correct if I am missing something.
I've recently performed a manual delete for a similar issue I was facing, opting instead to use the rimraf package to delete a module from the npm root directory where global packages are installed.
Install rimraf using:
npm install rimraf -g
Navigate to the root folder of where the global packages are installed. Path to this can be found using:
npm root -g
Once you've cd' into the root folder perform the delete on the quasar-cli module using:
rimraf <name of folder>
Note:
<name of folder> is the name of the folder quasar-cli is contained within. Perform a dir/w to list the folder in the directory to check the exact name of the folder to insert in the command above.
The rimraf package is a cross-platform equivalent of what I use in the bash terminal rm -rf to recursively delete files and folders. You can see this in action on windows via: https://www.youtube.com/watch?v=qPCK6mWeqsk
Check that the removal of the package as per your previous command:
npm list -g --depth=0
Hope that helps
I ultimately had to delete the node-modules folder from
C:\Users\{user}\AppData\Roaming\npm\node_modules
as I was having issue not only with quasar but also with vue and everything else.
vue --version also wasn't working.
I deleted the node-modules folder from the above path and also from my project folder and then re-installed them using npm install -g command. This command needs to be run in your project folder where you have your package.json file.
Else you can individually install(globally using the -g appended to the command) each component of your need.
Restart the command prompt after installing the packages.
Don't forget to keep a list of all the packages you have using
npm list -g --depth=0`
Try this
npm uninstall -g #quasar/cli