question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to install magepack, permission denied

See original GitHub issue
root@dev:~# npm install -g magepack
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
/usr/local/bin/magepack -> /usr/local/lib/node_modules/magepack/cli.js

> puppeteer@2.1.1 install /usr/local/lib/node_modules/magepack/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r722234! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/magepack/node_modules/puppeteer/.local-chromium'
  -- ASYNC --
    at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/lib/helper.js:111:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/magepack/node_modules/puppeteer/install.js:66:16)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path:
   '/usr/local/lib/node_modules/magepack/node_modules/puppeteer/.local-chromium' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: puppeteer@2.1.1 (node_modules/magepack/node_modules/puppeteer):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: puppeteer@2.1.1 install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ magepack@2.1.2
updated 1 package in 2.43s

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

3reactions
gwhartoncommented, Apr 8, 2020

Ahh yes the following works to install it globally.

npm install -g puppeteer --unsafe-perm=true
npm install -g magepack --no-optional

Now i just need to work out why it hangs after Collecting modules for bundle "category"

0reactions
gwhartoncommented, Jul 23, 2020

Yes, as it turns out I had xdebug enabled and my ide had actually dropped into a debug session without me noticing which was hanging the return of the webpage to magepack. You should try manually browsing to the url’s that you are passing to magepack. They need to work and return a good webpage without errors when accessed from the machine running magepack. Try wget/curl and inspect the source of the page you get back if you are in console only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install puppeteer showing permission denied errors
EDIT 20th April 2019: The easy solution suggested by lauraalvarezz1 is, sudo npm install -g puppeteer --unsafe-perm=true.
Read more >
magepack - npm
Start using magepack in your project by running `npm i magepack`. ... All data gathered on clean Magento 2 with sample data installed....
Read more >
Issue - NPM install permission denied - Plesk Forum
Hi, I installed Node JS (Extensions -> Node.JS) and activated Node on one ... After configuration i start "NPM Install" but I get...
Read more >
Change Log - Warden documentation
composer dir (resulting in creation by docker) can cause permissions error inside containers. Fixed issue with bin/magento setup:install allowing it to pass ...
Read more >
TLS Negotiation failed, the certificate doesn't match the host.
Let's look at how to setup and install MagePack for Magento 2.3.x. ... or updates that might temporarily break the site and return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found