Closed gavberlin closed 2 years ago
Hey! This seems to be caused by an old Node.js version that doesn't support top-level await or ESM module imports.
Pagecrypt works best with Node.js v16 or newer. What version do you get from running node -v
in your terminal? If it's <= 15 please try upgrading to v16 and it should hopefully solve the issue :)
Hey! Yepp, that was the solution...debian bullseye brings only node-12.2 in the repository. Now it works Tag!
Great! Good luck with your project and feel free to share any feedback!
npx pagecrypt index.html index_encrypt.html test file:///home/ansible/node_modules/pagecrypt/cli.js:23 var crypto = await loadCrypto(); ^^^^^
SyntaxError: Unexpected reserved word at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18) at async link (internal/modules/esm/module_job.js:42:21) npm ERR! code 1 npm ERR! path /home/ansible/pagecrypt npm ERR! command failed npm ERR! command sh -c pagecrypt "index.html" "index_encrypt.html" "test"
npm ERR! A complete log of this run can be found in: npm ERR! /home/ansible/.npm/_logs/2021-12-23T12_13_17_224Z-debug.log