xxhash requires un-fitted NODE_MODULE_VERSION
See original GitHub issue- Etcher version: 1.5.100
- Operating system and architecture: macOS 10.15.5 and Ubuntu 20.04 LTS
- Image flashed:
- Do you see any meaningful error information in the DevTools? Yes, please see the contents below.
Hi.
I want to build Etcher but I cannot on my side.
What I did are,
make distclean # To make sure it starts from the scratch
npm install
make electron-develop # I think `make webpack` also performed in this step
npm start
The screen shows nothing but a gray screen without any widget.
The Developer tools say,
Then I could get the below error when I enter npm test
.
~/Developer/etcher-test master* ❯ npm test 49s 12:24:58
> balena-etcher@1.5.100 test /Users/awesometic/Developer/etcher-test
> make lint test sanity-checks
balena-lint --fix --typescript typings lib tests scripts/clean-shrinkwrap.ts webpack.config.ts
sass-lint -v lib/gui/app/scss/**/*.scss lib/gui/app/scss/*.scss
cpplint --recursive src
Done processing src/utils/v8utils.cpp
Done processing src/os/elevate.h
Done processing src/elevator_init.cpp
Done processing src/os/win32/elevate.cpp
Done processing src/utils/v8utils.h
codespell \
--dictionary - \
--dictionary dictionary.txt \
--skip *.svg *.gz,*.bz2,*.xz,*.zip,*.img,*.dmg,*.iso,*.rpi-sdcard,*.wic,.DS_Store,*.dtb,*.dtbo,*.dat,*.elf,*.bin,*.foo,xz-without-extension \
lib tests docs Makefile *.md LICENSE
WARNING: Binary file: lib/gui/app/scss/fonts/SourceSansPro-Regular.ttf
WARNING: Binary file: lib/gui/app/scss/fonts/SourceSansPro-SemiBold.ttf
WARNING: Binary file: tests/data/wmic-output.txt
electron-mocha --recursive --reporter spec --require ts-node/register --require-main "tests/gui/allow-renderer-process-reuse.ts" --full-trace --no-sandbox --renderer tests/gui/**/*.ts
✖ ERROR: The module '/Users/awesometic/Developer/etcher-test/node_modules/xxhash/build/Release/hash.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 80. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Error: The module '/Users/awesometic/Developer/etcher-test/node_modules/xxhash/build/Release/hash.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 80. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.func [as dlopen] (electron/js2c/asar.js:140:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
at Object.func [as .node] (electron/js2c/asar.js:140:31)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/xxhash/lib/xxhash.js:4:13)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/xxhash/lib/xxhash.js:52:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/lib/source-destination/source-destination.ts:24:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/build/source-destination/source-destination.js:388:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/lib/source-destination/source-source.ts:17:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/build/source-destination/source-source.js:35:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/lib/source-destination/compressed-source.ts:25:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/build/source-destination/compressed-source.js:99:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/lib/multi-write.ts:23:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/build/multi-write.js:328:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/lib/index.ts:19:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/etcher-sdk/build/index.js:34:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .js] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:851:44)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/tests/gui/modules/image-writer.spec.ts:19:1)
at Object.<anonymous> (/Users/awesometic/Developer/etcher-test/tests/gui/modules/image-writer.spec.ts:134:3)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Module.m._compile (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:858:23)
at Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Object.require.extensions.<computed> [as .ts] (/Users/awesometic/Developer/etcher-test/node_modules/ts-node/src/index.ts:861:12)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:738:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /Users/awesometic/Developer/etcher-test/node_modules/electron-mocha/node_modules/mocha/lib/mocha.js:349:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/Users/awesometic/Developer/etcher-test/node_modules/electron-mocha/node_modules/mocha/lib/mocha.js:346:14)
at Mocha.run (/Users/awesometic/Developer/etcher-test/node_modules/electron-mocha/node_modules/mocha/lib/mocha.js:1006:10)
at Object.runMocha (/Users/awesometic/Developer/etcher-test/node_modules/electron-mocha/lib/mocha.js:31:11)
at EventEmitter.<anonymous> (/Users/awesometic/Developer/etcher-test/node_modules/electron-mocha/renderer/run.js:39:15)
at EventEmitter.emit (events.js:223:5)
at Object.onMessage (electron/js2c/renderer_init.js:2093:16)
(node:87249) Electron: Loading non-context-aware native module in renderer: '/Users/awesometic/Developer/etcher-test/node_modules/xxhash/build/Release/hash.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
make: *** [test-gui] Error 1
npm ERR! Test failed. See above for more details.
I have tried with Node.js 6, 8, 10, 12, 13, and 14 to change the NODE_MODULE_VERSION to 80, but doesn’t work.
Also tried using npm rebuild
and npm install --save-dev electron-rebuild
, ./node_modules/.bin/electron-rebuild
, but all couldn’t fix that issue.
With Node.js 6 and 8, npm install
even doesn’t work.
These all don’t on Ubuntu 20.04 LTS either.
How can I build it on myself?
Thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
NodeJS: How to fix different node module version?
The bcrypt package needs to be rebuild, because it was initially installed with another version of Node.js. Try this:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lurch , Oh actually I was able to build using that
npm install
beforemake electron-develop
when I was trying to with 1.5.86 ? version. Maybe that experience makes me don’t read the document anymore… 😅 Sorry.The document I linked to says:
😉 🤷 🙃 Glad you’ve got it working now though.