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
Hello! I'm brand new to deno, so I'm not sure how to debug this any further.
Importing and using anything from npm:@fuel-ts/abi-typegen@0.73.0 causes this error. It works fine in node.
Minimal repro
// cli.ts
import { ProgramTypeEnum } from "npm:@fuel-ts/abi-typegen@0.73.0";
console.log("hello", ProgramTypeEnum.CONTRACT);
$ deno run cli.ts
error: Uncaught SyntaxError: The requested module 'handlebars' does not provide an export named 'compile'
at <anonymous> (file:///<omitted>/Library/Caches/deno/npm/registry.npmjs.org/@fuel-ts/abi-typegen/0.73.0/dist/index.mjs:864:10)
When I look at the contents of <omitted>/Library/Caches/deno/npm/registry.npmjs.org/handlebars/4.7.8/types/index.d.ts, I can see that it exports the function compile.
I also tried deno run --unstable cli.ts to see if any of the unstable flags might help, but I get the same error.
The text was updated successfully, but these errors were encountered:
That isn't a typescript error. It errors at runtime. I have the same thing happen in Node.js when importing from an mjs file:
> node main.mjs
file:///.../node_modules/@fuel-ts/abi-typegen/dist/index.mjs:864
import { compile } from "handlebars";
^^^^^^^
SyntaxError: Named export 'compile' not found. The requested module 'handlebars' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'handlebars';
const { compile } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.11.1
Version:
deno 1.40.3 (release, x86_64-apple-darwin)
Hello! I'm brand new to deno, so I'm not sure how to debug this any further.
Importing and using anything from
npm:@fuel-ts/abi-typegen@0.73.0
causes this error. It works fine in node.Minimal repro
When I look at the contents of
<omitted>/Library/Caches/deno/npm/registry.npmjs.org/handlebars/4.7.8/types/index.d.ts
, I can see that it exports the functioncompile
.I also tried
deno run --unstable cli.ts
to see if any of the unstable flags might help, but I get the same error.The text was updated successfully, but these errors were encountered: