-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
TypeError: Can not find node binding files from @swc/core-win32-x64-gnu, @swc/core-win32-x64-msvc... #1351
Comments
Did you run npm install after copying? |
Oh i did not copy the project.
|
@tw-360vier I could not reproduce on my windows virtual machine, does |
@Brooooooklyn yes it's there:
|
@tw-360vier delete |
@Brooooooklyn same result:
|
I have tried many times from scratch and everything is ok on my windows vm. I'm using Could you add some debug log in library source code under the Add for (const triple of triples) {
if (packageName) {
try {
return require(require.resolve(`${packageName}-${triple.platformArchABI}`, { paths: [dirname] }));
}
catch (e) { } // ---------------------------------- add here
}
const localFilePath = path_1.join(dirname, `${filename}.${triple.platformArchABI}.node`);
if (fs_1.existsSync(localFilePath)) {
return require(localFilePath);
}
} |
@Brooooooklyn |
Two colleagues of mine have the same exact error on their windowses. The binary is there but loading it doesn’t work. Even doing so manually with node results in an error message:
(This works just fine on my windows install. And three other colleagues’.) On both my machine and the machine that isn’t working outputs of cygwin
I thought perhaps it’s an overbearing anti-virus that prevents loading the DLL but only basic windows defender is active. We all have the same version of node (v12.16.1; in fact, installed locally to the project folder by the build script) and use |
@sabberworm could you please add debug log in #1351 (comment) and try again? |
Unfortunately it doesn’t give us any more information, just the same nondescript “The specified module could not be found” as the manual method I posted above.
|
I was helping a coworker (also using Windows) with this issue recently, and he was using the following tools in our monorepo node 14.15.4 We resolved it by downgrading npm to the version shipping with node 14 (6.14.11). Maybe some of these problems are caused by this? |
I will check the npm@7 tomorrow |
I didn't look further into it, but I have other coworkers using the node 15 + npm 7 with swc so I think it's a mismatch issue if anything. |
$ uname -srm node: 12.21.0 |
Open napi-rs/node-rs#427 to track this problem |
I know this is a bit old, but I had a similar issue yesterday and just wanted to help anyone stumbling upon this thread because of a similar search. I solved this problem by installing the Visual C++ redistributables: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 |
Thank you! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
We've been using swc on linux and os x machines for a while.
Now a colleague tried to build a project on windows and encountered this error:
In fact this is copied from my minimal recreation of the same problem inside my Windows 10 VM.
But through swc-loader the error was the same.
The files
C:\Users\xyz\projects\swc-win32\node_modules\@swc\core\swc.win32-x64-gnu.node
andC:\Users\xyz\projects\swc-win32\node_modules\@swc\core\swc.win32-x64-msvc.node
do not exist.But the package
@swc/core-win32-x64-msvc
seems to have been installed:Input code
My minimal example only contains this package.json:
Config
// since this is a minimal example, i don't have a .swcrc
Expected behavior
swc cli to work
Version
The version of @swc/core: 1.2.45
Additional context
yarn versions
says:I would appreciate any help :)
The text was updated successfully, but these errors were encountered: