Experience-Monks / Experience-Monks/devtool

Require files outside of the project's node_modules folder

Open
#6 10 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
3.7k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

:wave: I have a bunch of modules required in my project that are outside of my project's node_modules folder, I know that's highly unusual, but that also works perfectly fine with Node because it looks for files in various places up to the file systems's root. However when I run my app through the devtool I get this error message:

```
Error: Cannot find module '@xsql/fixtures'
at Function.Module._resolveFilename (module.js:336)
at Function.Module._load (module.js:286)
at Module.require (module.js:365)
at require (module.js:384)
at Object. (index.js:18)
at Module._compile (module.js:434)
at Object.devtoolCompileModule [as .js] (/media/SSD/github/devtool/lib/require-hook.js:36)
at Module.load (module.js:355)
at Function.Module._load (module.js:310)
at Module.require (module.js:365)
at require (module.js:384)
at EventEmitter. (/media/SSD/github/devtool/lib/preload.js:60)
at emitOne (events.js:77)
at EventEmitter.emit (events.js:169)
```

That's a module that's not directly in my project's node_modules folder, it's a few levels up in the file system. So I'm suspecting that this is something Electron specific, but I'm not that familiar with it and have no clue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.