-
Notifications
You must be signed in to change notification settings - Fork 4
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' with yarn global #123
Comments
➜ uname -a
Darwin MacBook-Pro-de-adrien.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64 |
Hi! Is it possible that you tried this before #121 was merged? The error message makes me think so. If so, could you retry with the latest version ( |
Clean install same error
|
Could you give me the full log from running |
➜ workshop-kafka-developper git:(master) sensei --version
1.0.0
➜ workshop-kafka-developper git:(master) sensei pdf
Processing folder '/Users/awattez/Documents/kafka/workshop-kafka-developper' as 'workshop-kafka-developper' using slide size 1420x800 and language en
Generate pdf slides & labs
Build slides & labs
Files generated to dist folder
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module '/Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/src/pdf/node_modules/decktape/decktape.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
/Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/bin/sensei.js:157
throw err;
^
Error: spawned process exited with non-zero code '1'
at ChildProcess.<anonymous> (/Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/bin/sensei.js:96:11)
at ChildProcess.emit (events.js:375:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
internal/modules/cjs/loader.js:905
throw err;
^
Error: Cannot find module 'puppeteer'
Require stack:
- /Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/src/pdf/pdf.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/src/pdf/pdf.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/awattez/.nvm/versions/node/v14.17.3/lib/node_modules/@zenika/sensei/src/pdf/pdf.js'
]
} |
You're definitely still running an old version of sensei, This line
indicates that the pdf module is independent in the version you're running (it has its own Yarn is probably reinstalling from cache instead of fetching the newer version. You might be hitting some form of this yarn issue. Could you try cleaning your cache?
The issue suggests that this might be fixed by using a different syntax to point at the package. I'm going to test if I can find a syntax that works. |
I confirm that I cannot reproduce the issue when specifying a branch or commit (eg |
Switch to Node 16
Install with yarn :
Same error: ➜ workshop-kafka-developper git:(master) sensei pdf
Processing folder '/Users/awattez/Documents/kafka/workshop-kafka-developper' as 'workshop-kafka-developper' using slide size 1420x800 and language 'en'
Generate pdf slides & labs
Build slides & labs
Files generated to dist folder
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/Users/awattez/.config/yarn/global/node_modules/@zenika/sensei/node_modules/decktape/decktape.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
/Users/awattez/.config/yarn/global/node_modules/@zenika/sensei/bin/sensei.js:165
throw err;
^
Error: spawned process exited with non-zero code '1'
at ChildProcess.<anonymous> (/Users/awattez/.config/yarn/global/node_modules/@zenika/sensei/bin/sensei.js:104:11)
at ChildProcess.emit (node:events:390:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
➜ workshop-kafka-developper git:(master) Done! Install with node/mpm:
Sensei ➜ workshop-kafka-developper git:(master) sensei pdf
Processing folder '/Users/awattez/Documents/kafka/workshop-kafka-developper' as 'workshop-kafka-developper' using and language 'en'
Generate pdf slides & labs
Build slides & labs
Files generated to dist folder
Loading page file:/Users/awattez/Documents/kafka/workshop-kafka-developper/dist/slides.html ...
Done!
PDF labs generated
Loading page finished with status: 0
Reveal JS plugin activated
Printing slide #/10/15 (275/275) ...
Printed 275 slides
PDF slides generated Maybe not recommend to install globally |
I'd be interested to know if |
My bad, i'v used |
I cannot perform the pdf command if I use sensei after installing it using
yarn global add
The text was updated successfully, but these errors were encountered: