Giter VIP home page Giter VIP logo

Comments (10)

gwharton avatar gwharton commented on August 18, 2024 3

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"

from magepack.

krzksz avatar krzksz commented on August 18, 2024

This doesn't seem to be an issue with Magepack but rather with npm and node versions mismatch: nodejs/help#1877 Can you try updating both of them to newer releases?

from magepack.

gwharton avatar gwharton commented on August 18, 2024
root@dev:~# npm -v
6.14.4
root@dev:~# node -v
v13.12.0
root@dev:~# npm install -g magepack
/usr/local/bin/magepack -> /usr/local/lib/node_modules/magepack/cli.js

> [email protected] 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:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/magepack/node_modules/puppeteer/.local-chromium'
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/magepack/node_modules/puppeteer):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
updated 1 package in 2.736s

from magepack.

gwharton avatar gwharton commented on August 18, 2024

installs ok if i don't install globally.

The command mkdir '/usr/local/lib/node_modules/magepack/node_modules/puppeteer/.local-chromium' is failing because the folder /usr/local/lib/node_modules/magepack/node_modules/puppeteer does not exist.

from magepack.

krzksz avatar krzksz commented on August 18, 2024

Seems to be some kind of permissions issue on your machine, maybe related to puppeteer/puppeteer#367

from magepack.

gwharton avatar gwharton commented on August 18, 2024

yes, its a problem with the puppeteer installer by the looks of it. It works if you install puppeteer using npm install -g puppeteer --unsafe-perm=true and I can install puppeteer globally using that command, however the magepack install is insisting on installing its own copy of puppeteer, and I have no control over the command line arguments it uses. Can I get the magepack install to set --unsafe-perm=true when it installs pupeteer?

from magepack.

krzksz avatar krzksz commented on August 18, 2024

No, I don't think it is possible, but you can use npm's --no-optional to tell magepack to not install puppeteer at all.

from magepack.

krzksz avatar krzksz commented on August 18, 2024

Glad you made some progress! I suggest to go through https://www.npmjs.com/package/magepack#debugging and if you have any issues please add them as separate tickets, thanks!

from magepack.

potatskie avatar potatskie commented on August 18, 2024

@gwharton were you able to get a fix where it stuck on Collecting modules for bundle "category"

from magepack.

gwharton avatar gwharton commented on August 18, 2024

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.

from magepack.

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.