This is what I am currently receiving when I try to instill.
npm ERR! Unexpected end of JSON input while parsing near '...QoQAJQkmBR37svMSvUbRQ'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mattgranado/.npm/_logs/2021-08-31T02_54_24_892Z-debug.log
(base) mattgranado#Matts-MacBook-Pro ~ %
I did atttempt
npm cache clean --force
but only got this
npm WARN using --force I sure hope you know what you are doing.
npm ERR! Usage: npm cache add <tarball file>
npm ERR! npm cache add <folder>
npm ERR! npm cache add <tarball url>
npm ERR! npm cache add <git url>
npm ERR! npm cache add <name>#<version>
npm ERR! npm cache clean
npm ERR! npm cache verify
Then I attempted
sudo npm cache clean --force
to whom which I got the message below.
npm WARN using --force I sure hope you know what you are doing.
(base) mattgranado#Matts-MacBook-Pro ~ % npm install -g expo-cli
npm WARN deprecated graphql-tools#3.0.0: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as #graphql-tools/schema, #graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
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 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
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 querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
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 uuid#3.0.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 checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mattgranado/.npm/_logs/2021-09-02T02_11_33_424Z-debug.log
I would really appreciate any insight on what may be causing these issues.
Related
I am trying to follow: https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules
I am running Windows PowerShell as an administrator and I get this:
PS C:\WINDOWS\system32> npm install -g windows-build-tools
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated windows-build-tools#5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\seany\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\uri-js\dist'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\seany\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\uri-js\\dist'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\seany\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\seany\.windows-build-tools\vs_BuildTools.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR! at Function.defineProperty (<anonymous>)
npm ERR! at Object.removePath (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR! at Object.install (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR! at C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR! at Object.download (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! at async Object.aquireInstallers (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR! code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! }
npm ERR! windows-build-tools will now exit.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\seany\AppData\Local\npm-cache\_logs\2022-12-15T21_59_38_918Z-debug-0.log
I even tried Option 2 and I get:
PS C:\WINDOWS\system32> npm config set python python2.7
npm ERR! `python` is not a valid npm option
Python2.7 is the only python I have installed too.
Lastly I have tried following this: https://github.com/felixrieseberg/windows-build-tools
I still receive errors:
PS C:\Users\seany> npm install --global windows-build-tools
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
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 request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated windows-build-tools#5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\seany\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules\verror\node_modules'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\seany\\AppData\\Roaming\\npm\\node_modules\\windows-build-tools\\node_modules\\verror\\node_modules'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.15.amd64.msi
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\seany\.windows-build-tools\python-2.7.15.amd64.msi.
Downloading vs_BuildTools.exe
npm ERR! [============================================>] 100.0% (0 B/s)
npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\seany\.windows-build-tools\vs_BuildTools.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR! at Function.defineProperty (<anonymous>)
npm ERR! at Object.removePath (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR! at Object.install (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR! at C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR! at Object.download (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! at async Object.aquireInstallers (C:\Users\seany\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR! code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! }
npm ERR! windows-build-tools will now exit.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\seany\AppData\Local\npm-cache\_logs\2022-12-15T22_09_51_000Z-debug-0.log
Read this:
https://github.com/felixrieseberg/windows-build-tools/issues/20
the solution is more related to windows runtime that you missed, follow instruction.
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.
while I install (npm i --global #adonisjs/cli) I have an error
$ npm i --global #adonisjs/cli
npm WARN deprecated kleur#2.0.2: Please upgrade to kleur#3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated set-value#1.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
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 checkPermissions Missing write access to /usr/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/#adonisjs/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":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/afshin/.npm/_logs/2021-03-02T05_09_22_618Z-debug.log
As I saw an error is related to permission. SO you need to execute the command with the help of "sudo" like,
sudo npm i --global #adonisjs/cli
I am trying to install node.js and npm in my laptop using the following commands found here:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
These install Node.js LTS (v12.x).
After this, I am trying to install serverless as shown here.
I do:
npm install -g serverless
and it throws the following error
cortex#cortex-Lenovo-ideapad-720S-15IKB:~$ npm install -g serverless
npm WARN deprecated #types/chalk#2.2.0: This is a stub types definition for chalk (https://github.com/chalk/chalk). chalk provides its own type definitions, so you don't need #types/chalk installed!
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
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 WARN checkPermissions Missing write access to /usr/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules/serverless/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":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/cortex/.npm/_logs/2020-08-19T14_04_41_850Z-debug.log
I am completely new to node.js, so can anyone please help me out with this?
P.S.:
output of node -v is v12.18.3
output of npm -v is 6.14.6
Use sudo when installing a global package.
sudo npm install -g serverless
I'm trying to install npm live-server but I am getting the following errors:
stl34>>npm install live-server -g
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 opn#6.0.0: The package has been renamed to `open`
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 checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/stl34/.npm/_logs/2020-08-10T22_30_11_210Z-debug.log
The issue seems to be that the file permissions for /usr/local/lib/node_modules need to be changed.
I tried restarting in recovery mode and typing into the terminal:
csrutil disable
to disable SIP. Then I restarted and entered the following into the terminal:
sudo mount -uw /
chmod 775 usr/local/lib/node_modules
But the system still will not allow me to modify the file permissions. What can I do to modify them?
Another user asked this same question here:
NPM Live-server not installing on zsh
but received no answers.
running "sudo npm install live-server -g" worked for me