No loader is configured for ".node" files
See original GitHub issueI’m currently working on a project that is using tsup
to bundle the backend express
server for a vite
project.
However, when attempting to call createViteServer
I get 2 errors. The first being about not being able to resolve acorn
(Adding --external acorn
fixed that). However the other error I am not so sure about as such a simple fix for.
Unless I am missing something it seems like .node
modules would need to be added to tsup
in order to fix this/work around it?
> ../../node_modules/fsevents/fsevents.js:13:23: error: No loader is configured for ".node" files: ../../node_modules/fsevents/fsevents.node
13 │ const Native = require("./fsevents.node");
╵ ~~~~~~~~~~~~~~~~~
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
error: No loader is configured for ".node" files #1715 - GitHub
Please build in the necessary plugin/code to make errors like this go away. The text was updated successfully, but these errors were encountered ......
Read more >ESBuild error: No loader is configured for ".node" files ...
My code is still a work in progress but I have to somehow call gifToPng function in the setup so it converts all...
Read more >node-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >esbuild-loader - npm
Start using esbuild-loader in your project by running `npm i esbuild-loader`. ... Psst! Want to power up your Node.js with esbuild?
Read more >currently no loaders are configured to process this file - You.com
I found the problem by trial and error. The webpack.config.js wasn't happy with two separate module sections. Below is the config that resulted...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now just externalize any module that imports
.node
files. (this means moving such packges over to “dependencies” inpackage.json
or using the--external
flag explictly)Thanks @alexmarqs ! As I can see in your code, you also have a
"*"
rule defined incompilerOptions.paths
.@egoist should we do any change in tsup to accommodate that or we better keep it like that?