GithubHelp home page GithubHelp logo

Comments (5)

martinjackson avatar martinjackson commented on May 18, 2024

This error appeared when attempting installing zero on WSL Ubuntu 18.04 (Windows Subsystem for Linux) on Windows 10. Is this a WSL only problem? Is this an npm 6.8.0 problem?

I think this can be resolved by adding an asterisk and footnote to the install section.

  • Note: If you get an 'Error: EACCES: permission denied' (even as root), use npm config set unsafe-perm=true

Example:

sudo -i
npm config set unsafe-perm=true
npm install -g zero  

Problem:

sudo npm install -g zero
-- or --
sudo -i
npm install -g zero

... [section shortened]

[email protected] install /usr/lib/node_modules/zero/node_modules/node-sass > node scripts/install.js Unable to save binary /usr/lib/node_modules/zero/node_modules/node-sass/vendor/linux-x64-64 : { Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/zero/node_modules/node-sass/vendor'

Solution:

sudo -i
npm config set unsafe-perm=true
npm install -g zero  

... [section shortened]

from zero.

abritinthebay avatar abritinthebay commented on May 18, 2024

This isn't a bug. It's a giant security feature of npm. If you're bypassing this you're introducing security flaws and Zero absolutely should never, ever, recommend this incredibly dangerous behavior.

from zero.

asadm avatar asadm commented on May 18, 2024

I think I looked into this and as far I remember Zero needs to install node-sass which needs to mkdir some folders in global npm directory (which is owned by root) but npm runs npm install with a different user (nobody I think).

So as of now, the least unsecure method to install zero globally under root is:
npm install --unsafe-perm -g zero

Is there a better way?

from zero.

wlad avatar wlad commented on May 18, 2024

npm version: 6.14.11
npm install -g zero

npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: 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 [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details
npm WARN checkPermissions Missing write access to /usr/local/lib
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/zero/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @mdx-js/[email protected] requires a peer of @mdx-js/react@^1.6.17 but none is installed. You must install peer dependencies yourself.

npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib'
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/wlad/.npm/_logs/2021-02-22T10_38_35_030Z-debug.log

⚠️ Thus stuck at getting started 😞. How to proceed?

from zero.

slavos1 avatar slavos1 commented on May 18, 2024

Was same here and followed Getting Started.

However, got unstuck by not using sudo. 🤩

from zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.