You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Doesn't work in monorepo when modules are hoisted #199
I'm using yarn workspaces and the entry point for the electron is inside one of the packages. The package is called desktop-electron, and sits beside other modules like core and design. core is depended on the most, and yarn will make it available to all the other packages by hoisting it as a dep on the top-level. So the structure looks like this:
- node_modules/core (symlink, I think, to core in packages/)
- packages/
- core
- design
- desktop-electron
If I cd packages/desktop-electron and do ncc build index.js -o build, where index.js is the entry point to my electron app, I get the following error:
ERROR in ./index.js 77:11-59
Module not found: Error: Can't resolve 'core/lib-node/platform/server/fs' in '/Users/james/projects/actual/packages/desktop-electron'
when it definitely exists in the root node_modules
Nevermind, I think it's because the file it's trying to use is fs.electron.js, and I'm using custom extensions to load different files on different platforms. I have other issues that I'll try to dig into and file later, if I have time to try this again.
Activity
jlongster commentedon Dec 28, 2018
Nevermind, I think it's because the file it's trying to use is
fs.electron.js, and I'm using custom extensions to load different files on different platforms. I have other issues that I'll try to dig into and file later, if I have time to try this again.migueloller commentedon Aug 13, 2019
This seems to still be an issue! ncc warns that the module couldn't be found and the build subsequently fails when run.
feat: update @vercel/webpack-asset-relocator-loader to 1.10.3 (#1342)