build-tools: Cannot find module after installing @electron/build-tools on Arch
internal/modules/cjs/loader.js:895
throw err;
^
Error: Cannot find module '/home/ross/.electron_build_tools/src/e'
Require stack:
- /usr/lib/node_modules/@electron/build-tools/run.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
at Function.Module._load (internal/modules/cjs/loader.js:742:27)
at Module.require (internal/modules/cjs/loader.js:964:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/usr/lib/node_modules/@electron/build-tools/run.js:15:1)
at Module._compile (internal/modules/cjs/loader.js:1075:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1096:10)
at Module.load (internal/modules/cjs/loader.js:940:32)
at Function.Module._load (internal/modules/cjs/loader.js:781:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/lib/node_modules/@electron/build-tools/run.js' ]
}
I just ran npm install -g @electron/build-tools on Arch LInux and got this error after rehashing in zsh and running e init --root=~/electron --bootstrap testing.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 22 (4 by maintainers)
A solution I came up with:
I also suffered this issue. And I found out that
resolved my issue. If other people confirms that it is resolved by installing yarn, I suggests to modify README.md to state yarn to be ‘must install’ rather than ‘recommend installing’.
I also have this issue. I’ve tried npm i -g, but when I try to run e, it looks in my home directory instead of in /usr/lib:
Installing a copy in my user’s home directory seems to have resolved the issue.