Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'puppeteer' #13

Closed
maximumdata opened this issue Feb 28, 2018 · 5 comments
Closed

Cannot find module 'puppeteer' #13

maximumdata opened this issue Feb 28, 2018 · 5 comments
Labels

Comments

@maximumdata
Copy link

Saw this linked on echo.js, decided to give a couple of the examples a shot.

Copy/pasted the screenshot example from the docs into a js file, added a package.json, installed and saved browserless, then ran node on the js file. I'm assuming that would be a standard use-case for the lib.

Here's the error. I will spend some time chasing it down when I get home from work later.

    throw err;                                                                                                                                                                                            
    ^                                                                                                                                                                                                     
                                                                                                                                                                                                          
Error: Cannot find module 'puppeteer'                                                                                                                                                                     
    at Function.Module._resolveFilename (module.js:557:15)                                                                                                                                                
    at Function.Module._load (module.js:484:25)                                                                                                                                                           
    at Module.require (module.js:606:17)                                                                                                                                                                  
    at require (internal/module.js:11:18)                                                                                                                                                                 
    at Object.<anonymous> (/home/mike/dev/test/node_modules/browserless/index.js:6:19)                                                                                                                    
    at Module._compile (module.js:662:30)                                                                                                                                                                 
    at Object.Module._extensions..js (module.js:673:10)                                                                                                                                                   
    at Module.load (module.js:575:32)                                                                                                                                                                     
    at tryModuleLoad (module.js:515:12)                                                                                                                                                                   
    at Function.Module._load (module.js:507:3) ```
@Kikobeats
Copy link
Member

The dependency is not shipped with the library; actually it's a peer dependency:
https://github.com/Kikobeats/browserless/blob/master/package.json#L90

so you need to do npm install puppeteer and then browserless will be use your puppeteer version.

@maheshwar1729
Copy link

maheshwar1729 commented Aug 2, 2018

After running command sudo npm install puppeteer, I am getting an error like this...

puppeteer@0.13.0 install /home/eaachmh/gremlins-monkey-test/node_modules/puppeteer
node install.js

fs.js:143
throw err;
^

Error: EACCES: permission denied, mkdir '/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/.local-chromium'
at Object.fs.mkdirSync (fs.js:872:3)
at Object.downloadRevision (/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/utils/ChromiumDownloader.js:101:10)
at Object. (/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/install.js:50:12)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@0.13.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@0.13.0 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/eaachmh/.npm/_logs/2018-08-02T09_26_28_980Z-debug.log

@CsrCardoso
Copy link

After running command sudo npm install puppeteer, I am getting an error like this...

puppeteer@0.13.0 install /home/eaachmh/gremlins-monkey-test/node_modules/puppeteer
node install.js

fs.js:143
throw err;
^

Error: EACCES: permission denied, mkdir '/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/.local-chromium'
at Object.fs.mkdirSync (fs.js:872:3)
at Object.downloadRevision (/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/utils/ChromiumDownloader.js:101:10)
at Object. (/home/eaachmh/gremlins-monkey-test/node_modules/puppeteer/install.js:50:12)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
at startup (internal/bootstrap/node.js:238:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@0.13.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@0.13.0 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/eaachmh/.npm/_logs/2018-08-02T09_26_28_980Z-debug.log

I have the some error :C .

@Kikobeats
Copy link
Member

Feeling that these kinds of errors are related directly with https://github.com/GoogleChrome/puppeteer, not with browserless.

@cajunesque
Copy link

i have the same error on a winwdows box but not on a mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants