trzsz / trzsz.js

trzsz.js is the js version of trzsz, makes terminal built with electron and webshell to support trzsz ( trz / tsz ).
https://trzsz.github.io/js
MIT License
189 stars 12 forks source link

try/catch is invalid #6

Closed fullee closed 2 years ago

fullee commented 2 years ago

https://github.com/trzsz/trzsz.js/blob/7681a63a4cafa460949bec253f277466f9ee5d52/src/filter.ts#L190

My environment is browser but it goes to nodejs code

image

lonnywong commented 2 years ago

Did you define a require function?

If the node:fs module is available, it is recommended that you implement chooseSendFiles and chooseSaveDirectory.

Otherwise, maybe I should add an option to force it to run in browser.

fullee commented 2 years ago

I guess this function doesn't work,isRunningInBrowser.

lonnywong commented 2 years ago

Can you test require("fs") and require.resolve("fs") on the console?

image
fullee commented 2 years ago

I run npm install again and it works,very confused 😓

fullee commented 2 years ago

Reasons for Feels like vite compilation image

image