New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No loader is configured for ".node" files #303
Comments
@NuroDev i have same issue, you resolve it? |
For now just externalize any module that imports |
🎉 This issue has been resolved in version 5.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi @egoist I'm having a similar issue,
Error: Build failed with 1 error: Tried with multiple versions. Do you know how can I solve this? Thanks! |
@alexmarqs I am facing the same issue. Curious thing is that the simple presence of a config file makes this error appear. Works: $ ./node_modules/.bin/tsup src/index.ts --no-config
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v6.1.2
CLI Target: node14
CJS Build start
CJS ⚡️ Build success in 17ms
CJS dist/index.js 1.67 KB Fails: $ ./node_modules/.bin/tsup src/index.ts
✘ [ERROR] No loader is configured for ".node" files: ../../node_modules/.pnpm/fsevents@2.3.2/node_modules/fsevents/fsevents.node
../../node_modules/.pnpm/fsevents@2.3.2/node_modules/fsevents/fsevents.js:13:23:
13 │ const Native = require("./fsevents.node");
╵ ~~~~~~~~~~~~~~~~~ In my case, the problem is being caused by {
"compilerOptions": {
"baseUrl": "./",
"paths": {
"*": ["src/*", "node_modules/*"]
}
}
} Commenting out |
Hi @zvictor thanks for your feedback as well! In my case I was able to workaround this by just using the tsup property inside package.json for the configuration as an alternative to the config file. Cheers! |
Yes, that should work. In fact, any configuration file other than the TS one should work as well. Would you mind sharing your tsconfig with us? |
@zvictor example -> https://gist.github.com/alexmarqs/009cff7fcceb1b9012c61758298f10f9 + tsup property in package.json (as mentioned above). Hope this helps. |
Thanks @alexmarqs ! @egoist should we do any change in tsup to accommodate that or we better keep it like that? |
Kinda having the same error but on a Laravel 9 app:
Any hints? And no, it is not about |
The compilerOptions.path setting caused tsup to throw "No loader is configured for '.node' files" and fail to build. See: egoist/tsup#303
y have exaclty the same
C:\Users\CheatModes4\dev\profesional\updated-react-professional-configuration\node_modules\esbuild\lib\main.js:1636 Error: Build failed with 1 error: Node.js v18.10.0 |
Can confirm that it only pops up when using the config file. Specifying the flags directly to the |
I'm currently working on a project that is using
tsup
to bundle the backendexpress
server for avite
project.However, when attempting to call
createViteServer
I get 2 errors. The first being about not being able to resolveacorn
(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 totsup
in order to fix this/work around it?The text was updated successfully, but these errors were encountered: