Closed eguvep closed 3 weeks ago
Thanks, Peter ...
you can try this one
sudo npm install -g --verbose @liascript/exporter
this will install the exporter from npm. We have to check why the other option does not work anymore ...
I hope this works for you?
Best, André
Thanks a lot for the quick reply! The suggested option is doing a lot of stuff, but finally also quitting with some errors. Find the log file here: npm_lia_exp.log -- Peter
Hi, looks like puppeteer could not be installed, did you use sudo npm ...
to install or without sudo
?
What node and npm version are you using?
npm -v
Yes, I tried
sudo npm install -g --verbose @liascript/exporter
Get the same error on two different computers (see below). I am using
node v12.22.9
and
npm v8.5.1
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/@liascript/exporter/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.mjs
npm ERR! file:///usr/local/lib/node_modules/@liascript/exporter/node_modules/puppeteer/install.mjs:31
npm ERR! const {downloadBrowser} = await importInstaller();
npm ERR! ^^^^^
npm ERR!
npm ERR! SyntaxError: Unexpected reserved word
npm ERR! at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
npm ERR! at async link (internal/modules/esm/module_job.js:42:21)
Without sudo I get:
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
Can you try to upgrade your node version with n
:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
and then retry?
I did that, and the installation worked fine. I still had to do:
sudo chmod +x /usr/local/lib/node_modules/@liascript/exporter/dist/index.js
cd ~/.cache/puppeteer
npx @puppeteer/browsers install chrome@127.0.6533.88
to downgrade chrome to the desired version. Then
liaex -i EnergiespeicherVEP_A.md --format pdf --output Energiespeicher.pdf
was running some time and asked me to be patient, finally produced a pdf ... that was just a blanc page, though :-(
what do you see, when you run:
liaex -i EnergiespeicherVEP_A.md --format pdf --output Energiespeicher --pdf-preview
this should open the browser and display the content ...
I see a blank page.
That was a hard one .... the parcel bundler we use applied a regular expression to check for the origin of an URL
/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^\/]+)/
this works well for file://foo.bar, but not for the root file:/// ... that is why nothing was loaded or executed at all ...
I changed this manually at the moment and updated it ... This should work now.
Puppeteer has also been update to the latest version ... which should not require a manual installation ... next to some minor fixes ....
if you are using your courses on github, you could try to run the following workflow:
https://github.com/LiaScript/docs/blob/master/.github/workflows/deploy.yaml
I added this for testing purposes ... the output is stored as a release in the project:
https://github.com/LiaScript/docs/releases/tag/latest
... Hope it works for you too ... now ...
Thanks a lot for that very quick fix and for the CI workflow! Export is working perfectly now. LiaScript is - by far - the most efficient tool for creating contemporary learning material, I know!
Thanks for this revolutionary peace of software – I love it!
Unfortunately, some students still want to use a pdf for taking notes, because they are used to do it that way. So I tried to install the exporter with:
sudo npm install -g --verbose https://github.com/liaScript/LiaScript-Exporter
Unfortunately, this fails with:
Regards! -- Peter