Ooker
Ooker2y ago

How to ignore ts error when bundling?

I run
deno bundle '.main.ts' fibery.js
deno bundle '.main.ts' fibery.js
and it refuses to work due to 41 errors. Mostly they are any type error. When debugging they run fine. Is there a way to force bundling? I add the //@ts-ignore at the top of the file but it doesn't work
7 Replies
javi
javi2y ago
Bundle is deprecated (https://github.com/denoland/deno/issues/11073), try something like esbuild
GitHub
Issues · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
SyrupThinker
SyrupThinker2y ago
Have you already tried the --check=none flag?
Ooker
OokerOP2y ago
deno bundle --check=none '.\4. Tạo kết quả\4. Tạo kết quả.ts' fibery.js
deno bundle --check=none '.\4. Tạo kết quả\4. Tạo kết quả.ts' fibery.js
and
deno bundle '.\4. Tạo kết quả\4. Tạo kết quả.ts' fibery.js --check=none
deno bundle '.\4. Tạo kết quả\4. Tạo kết quả.ts' fibery.js --check=none
don't work is this the correct install command?
deno install --allow-read --allow-write -f https://deno.land/x/esbuild@v0.18.17
deno install --allow-read --allow-write -f https://deno.land/x/esbuild@v0.18.17
It throws
error: Module not found "https://deno.land/x/esbuild@v0.18.17".
error: Module not found "https://deno.land/x/esbuild@v0.18.17".
deno install https://deno.land/x/esbuild_deno_loader@0.8.1
deno install https://deno.land/x/esbuild_deno_loader@0.8.1
and
deno install https://deno.land/x/emit@0.25.0"
deno install https://deno.land/x/emit@0.25.0"
return Module not found as well
SyrupThinker
SyrupThinker2y ago
You need to provided a specific file in the module to install, that's why it can't find it:
> deno install -A https://deno.land/x/esbuild@v0.18.17/mod.js
✅ Successfully installed esbuild
/Users/syrup/Library/Application Support/XDG/state/stav/deno/bin/esbuild

~/Downloads
> esbuild --version
0.18.17
> deno install -A https://deno.land/x/esbuild@v0.18.17/mod.js
✅ Successfully installed esbuild
/Users/syrup/Library/Application Support/XDG/state/stav/deno/bin/esbuild

~/Downloads
> esbuild --version
0.18.17
Ooker
OokerOP2y ago
Hmm, why can't it auto use mod.js?
marvinh.
marvinh.2y ago
@ooker The // @ts-ignore comment only ignores errors in the next line. It doesn't silence all errors in the same file.

Did you find this page helpful?