Closed gasper94 closed 6 months ago
build locally & vercel deployment
Can you describe, what that actually fixes? To me it seems, that you only commented out/widened TS types?
I was trying to deploy a project to vercel using xTerm and xterm-addon-fit().
I got this error build error (dev worked fine): 7:10 Error: FitAddon not found in 'xterm-addon-fit' import/named
I had the library "xterm-addon-fit": "^0.8.0" and import { FitAddon } from 'xterm-addon-fit';
I pointed the library to this: import { FitAddon } from 'xterm-addon-fit/src/FitAddon';
but on that file: browser/renderer/shared/Types is nowehere to be found
so, I removed that line and everything worked as spected. I was able to run and build. I'm I doing something wrong?
You're pointing it to src/ which includes the typescript code. You are meant to use whatever main
in the package.json points to:
"main": "lib/addon-fit.js",
Otherwise you have to deal with compiling the TS yourself which isn't possible without the rest of the core repo.
Totally. I understand that but when I point it to "main" I get this error (7:10 Error: FitAddon not found in 'xterm-addon-fit' import/named): I have xtermjs + xterm-addon-fit on node_modules.
@gasper94 we've moved over to the @xterm
scope so you want the modules @xterm/xterm
and @xterm/addon-fit
Great!!! Thank you!
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
xterm-addon-fit@0.9.0-beta.37
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.