Missing write access node modules

Hi,

Having trouble trying to run npm install. Here is my output - edited down to just the first few lines of npm WARN checkPermissions

app@team-plan:~ 09:30

$ npm i

npm WARN deprecated babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!

npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/plugin-proposal-object-rest-spread

npm WARN checkPermissions Missing write access to /app/node_modules/babel-core

npm WARN checkPermissions Missing write access to /app/node_modules/serialize-javascript

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/cli

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/code-frame

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/core

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/generator

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/helper-annotate-as-pure

npm WARN checkPermissions Missing write access to /app/node_modules/@babel/helper-builder-

npm WARN react-router@4.3.1 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.

npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.

npm ERR! path /app/node_modules/@babel/plugin-proposal-object-rest-spread

npm ERR! code ENOENT

npm ERR! errno -2

npm ERR! syscall access

npm ERR! enoent ENOENT: no such file or directory, access '/app/node_modules/@babel/plugin-proposal-object-rest-spread'

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! /tmp/npm-cache/10.15.3/_logs/2019-07-12T09_32_22_315Z-debug.log

MOD EDIT: formatting

Hey @0sumrich, I guess doing enable-pnpm in console should fix the error.

2 Likes

Ah thanks, that’s done it

1 Like

Glad It worked. Mark the answer as solution so that others can get help too.

1 Like

@Ashutosh-3601 i have the same problem

app@html-db:~ 01:12 
$ npm i -g npm
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/aproba
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/block-stream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/bluebird
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/builtin-modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/chownr
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/cidr-regex
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/colors
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/cli-table3
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/es6-promise
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/figgy-pudding
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/fs-minipass
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/fstream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/genfun
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/get-stream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/graceful-fs
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/inherits
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/glob
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/is-builtin-module
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/JSONStream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/minizlib
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-bundled
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-packlist
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/retry
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/ssri
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-client
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/pump
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/socks
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/ssri
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/protoduck
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/readdir-scoped-modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/rimraf
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/semver
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/lock-verify
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/normalize-package-data
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-pick-manifest
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/spdx-license-ids
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/ssri
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/string_decoder
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/tar/node_modules/yallist
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/tar
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-lifecycle
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/unique-filename
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/worker-farm
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/write-file-atomic
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/yallist
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/lru-cache
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/cacache
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/make-fetch-happen
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/libnpmhook
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-profile
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/pacote
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/byte-size
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/call-limit
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/ci-info
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/config-chain
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/is-cidr
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/libcipm
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-audit-report
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/opener
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/query-string
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/read-package-tree
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/readable-stream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/sha
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/copy-concurrently/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/gauge/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/gentle-fs/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/libnpmhook/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/node-gyp/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-client/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/tar/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/are-we-there-yet
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/concat-stream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/cross-spawn
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/duplexify
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/execa
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/flush-write-stream
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/from2
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/got
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/is-ci
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/move-concurrently
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/parallel-transform
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/run-queue
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/stream-iterate
npm WARN checkPermissions Missing write access to /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/through2
npm ERR! path /opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base'
npm ERR!  { Error: EACCES: permission denied, access '/opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/opt/nvm/versions/node/v8.15.1/lib/node_modules/npm/node_modules/agent-base' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/8.15.1/_logs/2019-07-13T01_12_43_455Z-debug.log

MOD EDIT: formatting

my html db needs the newest version of npm to be able to save the databases my package makes into the network, where only an admin can access them

Hey @Jonyk56, As I mentioned, doing enable-pnpm in console will fix the error.

@Ashutosh-3601 i already tried that

Hey @Jonyk56 we’d need to know your project name to be able to look any closer. That error might indicate that you have Node listed in your dependencies in package.json, which it shouldn’t be.

Alternatively the problem might be that you’re running npm with -g. What do you see if you omit that?

I still don’t understand what running npm manually (instead of allowing Glitch to manage your packages as it expects to) gains you, or why you’re using npm (which makes your packages take up space in your project) instead of pnpm (which puts the packages in shared space).

i have to install npm 3.5.1 Dev build so my package, html-db will work properly with the new features being added…
so i tried to run npm i -g npm and got an error
then i tried pnpm i -g npm " " " "
" " " pnpm i -g pnpm " " " "
" " " npm i -g npm " " " "
" " " npm i npm " " " "
" " " npm i pnpm " " " "
" " " pnpm i npm " " " "
" " " pnpm i pnpm " " " "

see my dilemma?

i do use npm the way glitch wants me to, but i need the latest dev build

I think I understand; thanks for trying to explain.

We’re looking at upgrading pnpm sometime in the not-distant future, although I don’t have a specific timeline for that. Hopefully when we can do that this will become easier for you. Sorry for the bother!

ok, i will look forward to that date