-
Notifications
You must be signed in to change notification settings - Fork 16k
Paths set in NODE_PATH are not available in the browser process #11
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
Comments
When the To modify the module's search paths in require('module').globalPaths.push(searchPath); This feature (modify the search paths after script is loaded) is atom-shell only, I'll document it. |
Do you think we should use module.globalPaths instead of NODE_PATH for everything? It would be more consistent, but are there are downsides? |
|
I can't get module.globalPaths to work in the browser process. I run this code in main.coffee console.log require('module').globalPaths
require('module').globalPaths.push(resourcePath + "/src/app")
console.log require('module').globalPaths
require('point') And this is the output
|
The require('coffee-script')
require('coffee-cache').setCacheDir('/tmp/atom-coffee-cache')
require('module').globalPaths.push(resourcePath + "/src/app")
require('point') |
Ahh, thanks! |
* add option to disable devtools * beautify codes * initialize disable_devtools_
* vendor/libchromiumcontent e70a88f...4aae27b (2): > Merge pull request #11 from brightray/windows-build > Merge pull request #10 from brightray/windows-scripts
* vendor/libchromiumcontent e70a88f...4aae27b (2): > Merge pull request #11 from brightray/windows-build > Merge pull request #10 from brightray/windows-scripts
This PR landed in electron v1.7.12 🎉 |
Add Travis/AppVeyor CI build through Electron
I'm trying to move the classes in main.coffee into multiple files, but the browser process's require doesn't know about the paths set on NODE_PATH. This even fails when the first thing main.coffee does is set the NODE_PATH env variable.
The text was updated successfully, but these errors were encountered: