Closed Vanderscycle closed 3 years ago
Heya! You are trying to use FZF as a CommonJS module, but FZF exports itself as an ES and a UMD module. If you don't care about this module business, here are the steps you could follow to resolve the issue:
"type": "module"
to package.json
tsconfig.json
. You would see a line mentioning "module": "commonjs"
. Change it to "module": "ES2020"
.watch
and dev
commands and run them againJust for reference, here is the tsconfig.json
that I used:
{
"compilerOptions": {
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
Hopefully that solves it. Closing this issue for now.
Hey, sorry the notification went unnoticed for me. Yeah, the changes made fzf work.
Hey,
Thank you for making this npm package. I use fzf all the time in neovim and so I wanted to add the search ease and speed given by fzf into my ts projects. My issue at the moment is simple, I can't get it to run and I don't know why. I am working on a data structure hence why I am currently using ts-node, before implementing inside a svelte app.
Describe the bug Can't compile the js code
To Reproduce test code
Expected behavior TS compiles and run
Additional context my package.json
Environment Browser name and version: using ts-node to develop a node env 16.10
Any help is appreciated thanks