Skip to content
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

'Require' imports from parent, not "config" #5

Open
prozacgod opened this issue Jun 14, 2018 · 0 comments
Open

'Require' imports from parent, not "config" #5

prozacgod opened this issue Jun 14, 2018 · 0 comments

Comments

@prozacgod
Copy link

prozacgod commented Jun 14, 2018

This may be "as designed" but it was a bit confusing. And I run Node-red in a bit different manner, so this could be my fault.

I run my node-red admin tool not as a global install but from a directory where I control the arguments to the config folder.

example

mkdir ~/NodeRed yarn init -y . yarn add node-red yarn add node-red-admin mkdir config
I run node red once, stop it set the password, and restart.
yarn node-red -u config -v

~/NodeRed <- parent project that hosts all my node-red junk

~/NodeRed/config <- node red flow project as edited by node-red

I i go into the NodeRed/config directory and install a package - (I installed https://www.npmjs.com/package/rss-node-mongo)

and then created an unsafe function to import it.

I could not import the module from within that unsafe function

but when I added it to the ~/NodeRed project it worked fine.

I've never deployed my node-red projects as they are all for personal use or home projects or whatever and I prefer to keep the admin tool running for my needs. BUT ... I think unsafe function would break in this context, not being able to find the module, and would need the module installed as a global.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant