Module did not self-register only for Windows platform
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
Related but different from #2695
We have a Go library with JS bindings, see https://github.com/tdewolff/minify/tree/master/bindings/js which builds a Go library (using MingW) to a C archive, then we use that together with the C file to build the NAPI binary. I use GitHub actions to build on each platform, see https://github.com/tdewolff/minify/blob/master/.github/workflows/nodejs.yml.
The native addon builds and runs for Ubuntu and MacOS, but for Windows it keeps giving the error "Module did not self-register" at https://github.com/tdewolff/minify/runs/7293618101?check_suite_focus=true#step:6:94. Is there anyway to get a more specific error or debug message what is going on?
The Node and NPM version is the same which usually seems to cause this issue. Perhaps is using the MSVC compiler with GYP together with the MingW compiler for Go causing the problem. Since Go must use MingW, can I configure GYP to use MingW?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bindings/js and .github/workflows/nodejs.yml, then reproduce the Windows native-addon build from the linked GitHub Actions run. Compare the Windows build configuration with Ubuntu and macOS and investigate the “Module did not self-register” failure. Done means identifying a reproducible cause and an actionable build or configuration change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, javascript, nodejs
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100