contentful / contentful.js

JavaScript library for Contentful's Delivery API (node & browser)
https://contentful.github.io/contentful.js
MIT License
1.19k stars 200 forks source link

Cannot use sudo npm install or sudo npm update #307

Closed snowc0de closed 5 years ago

snowc0de commented 5 years ago

Expected Behavior

Want to test if NPM works but it don't.

Actual Behavior

I have a problem, I started this command : sudo npm update and there is the output :

> puppeteer@1.12.2 install /home/julien/Apps/telescope/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r624492! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/home/julien/Apps/telescope/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/home/julien/Apps/telescope/node_modules/puppeteer/lib/helper.js:108:27)
    at Object.<anonymous> (/home/julien/Apps/telescope/node_modules/puppeteer/install.js:64:16)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/home/julien/Apps/telescope/node_modules/puppeteer/.local-chromium' }
npm WARN less-loader@4.0.6 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.12.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@1.12.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/julien/.npm/_logs/2019-02-07T17_06_08_590Z-debug.log

Possible Solution

I have no ideas of what I should do...

Steps to Reproduce

  1. git clone https://github.com/telescopejs/telescope.git
  2. cd telescope
  3. sudo npm install
  4. sudo npm update

The error occurs with the 3rd and the 4th step...

Context

I want to install Telecope app Nova (reddit clone) but I can't I also try with Meteor but it don't works

Environment

Khaledgarbaya commented 5 years ago

Hey @chopin2712, Did you mean to create this issue on the telescope repo? I don't think it's related to contentful.

snowc0de commented 5 years ago

Hey @chopin2712, Did you mean to create this issue on the telescope repo? I don't think it's related to contentful.

Yes but why sudo npm update don't work, it is not related to Telescope...

Khaledgarbaya commented 5 years ago

Yes but why sudo npm update don't work, it is not related to Telescope...

it's an npm issue not related to contentful package