You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/bennett/src/shared-infra/node_modules/.pnpm/@[email protected][email protected]/node_modules/@openpgp/web-stream-tools/lib/streams.js:1
import { isNode, isStream, isArrayStream, isUint8Array, concatUint8Array } from './util';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1149:20)
at Module._compile (node:internal/modules/cjs/loader:1190:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1280:10)
at Module.load (node:internal/modules/cjs/loader:1089:32)
at Function.Module._load (node:internal/modules/cjs/loader:930:12)
at Module.require (node:internal/modules/cjs/loader:1113:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/Users/bennett/src/shared-infra/apps/shared/src/lib/github-actions-iam-accesskeys.ts:4:1)
at Module._compile (node:internal/modules/cjs/loader:1226:14)
In #1, it was suggested that the right way to consume this module is to import it from openpgp
npm i openpgp
require('openpgp').stream
Is that still the recommended method? openpgp no longer exports stream, see openpgpjs/openpgpjs#1363
Another option might be to add "type: "module" to package.json, and then use a dynamic import, but I'm not sure what else that will affect.
The text was updated successfully, but these errors were encountered:
Hi, this is related to #12 , and it's generally dependant on your TS configuration & build system. We're considering adding type: "module" to package.json, feel free to open a PR so that we can test the compatibility.
To reproduce:
Attempt to run in typescript:
Error:
In #1, it was suggested that the right way to consume this module is to import it from
openpgp
Is that still the recommended method?
openpgp
no longer exportsstream
, see openpgpjs/openpgpjs#1363Another option might be to add
"type: "module"
to package.json, and then use a dynamic import, but I'm not sure what else that will affect.The text was updated successfully, but these errors were encountered: