-
Notifications
You must be signed in to change notification settings - Fork 47
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
build error when add registry-js #190
Comments
Hey @zredb, I'm afraid the loh you provided doesn't give us much to go on. Have you been able to use registry-js in the past? We've done a few recent updates so I would try installing an older version and seeing if the problem exists there as well |
I have the same problem. I'm using https://github.com/juliangruber/downloads-folder which uses 1.12.0.
|
I´m experiencing the same issue here. Is there a workaround? I tryed some older versions too, every version until 1.6.0. I am able to install the dependency, but when my app starts it returns the error:
Maybe there is something related to my webpack config... |
Apparently fixed adding node-loader to webpack. |
I confirm that the issue disappeared after adding the following to webpack configuration: {
test: /\.node$/,
use: {
loader: 'node-loader',
},
}, |
Had the same problem using downloads-folder 1.0.4. in my VSCode extension Tried adding the node-loader as suggested, but it didn't work for me. Ended up going back to downloads-folder 1.0.3, which doesn't pull in registry-js. |
That's how I solved it, but downloads-folder 1.0.3 some problems #5, This is not a good solution😂 |
When you use new node version (18+), the registry is still using the historical prebuild package, which leads to a mismatch between node-gyp and the current node version, so you need to either update node-gyp, or force a prebuild package using resolutions |
Hi,
When I add registry-js via npm install registry-js, the program build will fail. the details log is as below:
=======================================================================
C:\code\Msp_electron>npm install registry-js --python="C:\Users\zredb\miniconda3\python.exe"
prebuild-install WARN install unexpected end of file
C:\code\Msp_electron\node_modules\registry-js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_
modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
main.cc
win_delay_load_hook.cc
正在创建库 C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.lib 和对象 C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.exp
registry.vcxproj -> C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.node
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 34 packages from 25 contributors, removed 2 packages and audited 1666 packages in 25.114s
found 1 low severity vulnerability
run
npm audit fix
to fix them, ornpm audit
for detailsC:\code\Msp_electron>yarn serve
yarn run v1.21.1
$ vue-cli-service electron:serve
INFO Starting development server...
98% after emitting CopyPlugin
DONE Compiled successfully in 28118ms 9:11:15
App running at:
Note that the development build is not optimized.
To create a production build, run yarn build.
\ Bundling main process...
ERROR Failed to compile with 1 errors 9:11:18
error in ./node_modules/registry-js/build/Release/registry.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
@ ./node_modules/registry-js/dist/lib/registry.js 5:6-50
@ ./node_modules/registry-js/dist/lib/index.js
@ ./src/background.js
@ multi ./src/background.js
ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\code\Msp_electron>
Any one can give some suggestion?
The text was updated successfully, but these errors were encountered: