Comments (5)
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]
- [email protected] added 1342 packages from 831 contributors in 329.177s
from zero.
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.
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.
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
getting started
😞. How to proceed?
from zero.
Was same here and followed Getting Started.
However, got unstuck by not using sudo. 🤩
from zero.
Related Issues (20)
- TypeScript paths is ignored HOT 6
- Socket.io support? HOT 1
- Prerendering for static hosting
- Node.js: wrong dependencies result
- Node.js: Add debug support
- Node.js: show input as well as line:column when failed to compile
- Node.js, TS: zero tries to compile non-jsx TS as jsx HOT 2
- Svelte : stores support HOT 1
- Flask's abort(404) does not work with Zero HOT 1
- Vue 3 support? HOT 1
- import file in python
- Error With React DOM HOT 1
- Development or Production
- Is anyone using Zero to serve Deno TypeScript?
- Does this support the react-router? HOT 1
- Checking Version and Help CLI Flags
- Python flask render_template
- Google Cloud Run HTTPS errors
- Following React instructions doesn't work HOT 1
- Feature Request: Organized way of managing projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zero.