Closed mandeep-bal closed 4 years ago
Not sure if this is the same issue or not, but one user of mine reported the following error when trying to install gsts
with the command npm install --global gsts
:
> puppeteer@2.1.1 install /usr/local/lib/node_modules/gsts/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/gsts/node_modules/puppeteer/.local-chromium'
-- ASYNC --
at BrowserFetcher.<anonymous> (/usr/local/lib/node_modules/gsts/node_modules/puppeteer/lib/helper.js:111:15)
at Object.<anonymous> (/usr/local/lib/node_modules/gsts/node_modules/puppeteer/install.js:66:16)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11 {
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/local/lib/node_modules/gsts/node_modules/puppeteer/.local-chromium'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@2.1.1 install: `node install.js`
npm ERR! Exit status 1
I would appreciate any thoughts on this. Thanks!
@limewxr @mandeep-bal this is typically an issue with permissions on the host. What I recommend is either owning the directory where npm or yarn install their artifacts - in this case, sudo chown -R <your_username>: /usr/local/lib/
or, if you're comfortable, sudo npm install --global gsts
. The latter is unrecommended for security reasons.
@mandeep-bal try to browse to /usr/local/lib/node_modules/gsts/node_modules/puppeteer
and running node install.js
.
@ruimarinho thank you!
hey @ruimarinho , recently we encountered the same error as well, and solved it by following your instructions. It would be great if you can add it into the readme https://github.com/ruimarinho/gsts#troubleshooting when you have time, so that users know this is a known issue (with working solution) that can happen to some users. Thank you a lot!
Error: Browser is not downloaded. Run "npm install" or "yarn install"
@limewxr thanks, added in https://github.com/ruimarinho/gsts/commit/40e59ce6cfd6e8f89b3bf8e256ac0a63d2676785.
Error: Browser is not downloaded. Run "npm install" or "yarn install" at ChromeLauncher.launch (/usr/local/lib/node_modules/gsts/node_modules/puppeteer/lib/Launcher.js:236:15) at module.exports.launch (/usr/local/lib/node_modules/gsts/node_modules/puppeteer/lib/Puppeteer.js:40:27) at PuppeteerExtra.launch (/usr/local/lib/node_modules/gsts/node_modules/puppeteer-extra/dist/index.cjs.js:129:41)