question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No loader is configured for ".node" files

See original GitHub issue

I’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:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
egoistcommented, Jun 29, 2021

For now just externalize any module that imports .node files. (this means moving such packges over to “dependencies” in package.json or using the --external flag explictly)

1reaction
zvictorcommented, Jun 12, 2022

Thanks @alexmarqs ! As I can see in your code, you also have a "*" rule defined in compilerOptions.paths.

@egoist should we do any change in tsup to accommodate that or we better keep it like that?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found