npm ENOENT error - node.js

I am attempting to install something with npm but every time I get an ENOENT error. When doing npm install gulp I get:
C:\Users\coope\TextGame>npm install gulp
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace
it, following the guidelines at https://medium.com/gulpjs/gulp-util-
ca3b1f9f9ac5
npm WARN deprecated graceful-fs#3.0.11: please upgrade to graceful-fs 4
for compatibility with current and future versions of Node.js
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 minimatch#0.2.14: Please update to minimatch 3.0.2
or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: please upgrade to graceful-fs 4
for compatibility with current and future versions of Node.js
npm WARN deprecated natives#1.1.3: This module relies on Node.js's
internals and will break at some point. Do not use it, and update to
graceful-fs#4.x.
npm WARN textgame#1.0.0 No description
npm ERR! path C:\Users\coope\TextGame\node_modules\ansi-styles
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename
'C:\Users\coope\TextGame\node_modules\ansi-styles' ->
'C:\Users\coope\TextGame\node_modules\.ansi-styles.DELETE'
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\coope\AppData\Roaming\npm-cache\_logs\2018-04-
07T21_48_09_076Z-debug.log
For other modules such as express, I get a similar error except with the bytes module.
I have attempted to install these missing modules with npm but npm can't install anything. Installing the modules manually works but there are too many dependencies for that to be reasonable. How can this be fixed?

Related

NPM ERR! code 1 when installing any packages on Windows 10

I don't know what changed on my windows PC, but I can't install any packages on my PC right now. I tried installing these packages today:
npm install needle
npm install got
npm install oauth-1.0a
and I received very similar error messages. I didn't have this problem before so I'm really confused as to why i'm having these errors now.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\Tyree\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\Tyree\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > wyvern-schemas#0.14.1 prepublish
npm ERR! > scripts/build.sh
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectOpenSea/wyvern-js.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ahultgren/async-eventemitter.git
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated uuid#3.3.2: 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 ERR! 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 ERR! npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
npm ERR! 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 ERR! npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated popper.js#1.14.3: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm ERR! npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated eth-sig-util#1.4.2: Deprecated in favor of '#metamask/eth-sig-util'
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated uuid#2.0.1: 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 ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethashjs#0.0.8: New package name format for new versions: #ethereumjs/ethash. Please update.
npm ERR! npm WARN deprecated ethereumjs-blockchain#4.0.4: New package name format for new versions: #ethereumjs/blockchain. Please update.
npm ERR! npm WARN deprecated uuid#3.2.1: 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 ERR! npm WARN deprecated ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-vm#2.6.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated ethereumjs-block#1.7.1: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm ERR! npm WARN deprecated ethereumjs-account#3.0.0: Please use Util.Account class found on package ethereumjs-util#^7.0.6 https://github.com/ethereumjs/ethereumjs-util/releases/tag/v7.0.6
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated ethereumjs-vm#4.2.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated core-js#2.6.12: core-js#<3.4 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! 'scripts' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\Tyree\AppData\Local\npm-cache\_cacache\tmp\git-clonemSjZbY
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c scripts/build.sh
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\Tyree\AppData\Local\npm-cache\_logs\2022-10-19T19_46_18_861Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tyree\AppData\Local\npm-cache\_logs\2022-10-19T19_46_17_124Z-debug-0.log
Try Uninstalling and Re-installing Node to the latest Stable Version.

how to solve npm ERR code 1 when running npm opensea js

I'm getting multiple errors and I'm really struggling with this for more than 3-4 hours. Because I tried the solutions of those who received this error before, but failed. It would be appreciated if you could help.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\ewaR\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\ewaR\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > wyvern-schemas#0.14.1 prepublish
npm ERR! > yarn build
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ahultgren/async-eventemitter.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ethereumjs/ethereumjs-abi.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectOpenSea/wyvern-js.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/frozeman/bignumber.js-nolookahead.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git
npm ERR! npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated eth-sig-util#1.4.2: Deprecated in favor of '#metamask/eth-sig-util'
npm ERR! npm WARN deprecated uuid#3.0.1: 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 ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! 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 ERR! 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 ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! 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 ERR! npm WARN deprecated uuid#2.0.1: 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 ERR! npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-block#1.7.1: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated ethereumjs-vm#2.6.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm ERR! npm WARN deprecated core-js#2.6.12: core-js#<3.4 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! 'yarn' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\ewaR\AppData\Local\npm-cache\_cacache\tmp\git-cloneViKlSY
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c yarn build
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\ewaR\AppData\Local\npm-cache\_logs\2022-03-12T03_31_24_992Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ewaR\AppData\Local\npm-cache\_logs\2022-03-12T03_31_23_039Z-debug-0.log^
I believe this issue is from installing opensea-js with a newer version of Nodejs. I had this same exact issue and I downgraded to Node v14.7.* (I believe) and it resolved my issue. Opensea-js is running on an old version of node for some reason, which is why it's causing this issue.

node.js npm local install ENOENT chmod error

I am getting errors trying to run npm install on a node/react app which I am taking over development of.
I'm not trying to install any packages globally. I am on an M1 Macbook Pro running Big Sur. I did a fresh install of node and npm with Homebrew. I also tried removing the package-lock.json file, cleaning the npm cache, and adding a .npmignore file to the directory as some other posts have suggested; none of these worked.
Here is the output when I run npm install
MacBook-Pro-2 frontend % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [my project name]-dashboard#0.1.0
npm ERR! Found: webpack#5.39.0
npm ERR! node_modules/webpack
npm ERR! webpack#"5.39.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from optimize-css-assets-webpack-plugin#6.0.0
npm ERR! node_modules/optimize-css-assets-webpack-plugin
npm ERR! optimize-css-assets-webpack-plugin#"6.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 /Users/<name>/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/<name>/.npm/_logs/2021-06-15T17_41_19_910Z-debug.log
I tried to run npm install --legacy-peer-deps, which causes a slightly different error:
MacBook-Pro-2 frontend % npm install --legacy-peer-deps
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/pinpoint#1.0.2: Moved to 'npm install #sideway/pinpoint'
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated #hapi/formula#1.2.0: Moved to 'npm install #sideway/formula'
npm WARN deprecated topojson#3.0.2: Use topojson-client, topojson-server or topojson-simplify directly.
npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/joi#16.1.8: Switch to 'npm install joi'
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/<name>/Developer/<directory>/frontend/node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify'
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/<name>/.npm/_logs/2021-06-15T17_41_57_785Z-debug.log
I solved my own problem. I think this is a common error message, with many potential solutions; here are 2 things I tried that fixed the issue for me:
Make sure you have postgresql installed (if your project includes a postgresql db, like mine). On a mac with homebrew, just run brew install postgresql.
I also downgraded my version of Node.js to the most up-to-date long term support version (previously I was using the dev version). At the time of writing the LTS version was 14.7.
After making these changes, I was able to get my site to install and start correctly.

how to install module sqlite3 on node if error

I try to install module sqlite? but there is an error, what to do:
$ npm install sqlite3
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
sqlite3#5.0.0 install D:\CODE\21_data\node_modules\sqlite3
node-pre-gyp install --fallback-to-build
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
npm WARN enoent ENOENT: no such file or directory, open 'D:\CODE\21_data\package.json'
npm WARN 21_data No description
npm WARN 21_data No repository field.
npm WARN 21_data No README data
npm WARN 21_data No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 216
npm ERR! sqlite3#5.0.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 216
npm ERR!
npm ERR! Failed at the sqlite3#5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Thanks for answers!
Problems solved:
1.npm cache clean --force
2.delete node_modules folder
3.delete package-lock.json file
4.npm install

getting npm install errors angular

I am getting some errors while installing node modules on another PC, having the same node version (10.15.0).
Where is the error? I have already deleted the node_modules folder and package-lock.json file and then run npm install command, but this didn't help.
C:\node\inventory_app_web>npm install
npm WARN deprecated #angular/http#7.0.4: Switch to #angular/common/http - see https://angular.io/guide/http
npm WARN deprecated core-js#2.5.7: 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 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 istanbul#0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git#github.com/eligrey/FileSaver.js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\Sohail Ahmad\AppData\Roaming\npm-cache\_logs\2020-01-02T18_09_24_498Z-debug.log
My mistake, I had Git installed, but it was only accessible from Git Bash. reinstalled it with second option and it solved my problem:

Resources