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
When try to compile yargs in deno 2.0 i received this error
error: Module not found "https://deno.land/x/[email protected]/build/lib/yerror.js".
at https://deno.land/x/[email protected]/lib/platform-shims/deno.ts:18:22
i thin is a import error there, they try import js file but only ts file exists
importyargsfrom"https://deno.land/x/[email protected]/deno.ts";importtype{Arguments}from"https://deno.land/x/[email protected]/deno-types.ts";// Configura o yargs para capturar os argumentos da linha de comandoconstargv=yargs(Deno.args).option("portFacade",{alias: "pf",type: "number",description: "Porta da Facade",// demandOption: true,}).demandCommand(0).strictOptions().parseSync();functionmain(args: Arguments){console.log(args);}main(argv);
The problem is the tags being used for the deno versions of yargs have -deno on the end of the version number. Try adding that:
- import yargs from "https://deno.land/x/[email protected]/deno.ts";+ import yargs from "https://deno.land/x/[email protected]/deno.ts";- import type { Arguments } from "https://deno.land/x/[email protected]/deno-types.ts";+ import type { Arguments } from "https://deno.land/x/[email protected]/deno-types.ts";
Issue
When try to compile yargs in deno 2.0 i received this error
i thin is a import error there, they try import
js
file but onlyts
file existsyargs/lib/platform-shims/deno.ts
Line 18 in 3566b84
Steps to reproduce
deno init
main.ts
fileSystem information
OS: Win11 x64
Deno: deno 2.0.3 (stable, release, x86_64-pc-windows-msvc)
v8 12.9.202.13-rusty
typescript 5.6.2
The text was updated successfully, but these errors were encountered: