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

CLI is not picking up ENV variables when installed globally via npm #321

Open
rzadp opened this issue Oct 22, 2021 · 2 comments
Open

CLI is not picking up ENV variables when installed globally via npm #321

rzadp opened this issue Oct 22, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@rzadp
Copy link
Contributor

rzadp commented Oct 22, 2021

CLI is picking up ENV variables through its env-map file:

https://github.com/dxos/cli/blob/main/packages/cli-core/src/env-map.json

The setup is working fine when the CLI is installed in a repository and run through yarn dx - example setup is working in console.

However it seems to not be working when CLI is installed globally.

Steps to reproduce:

npm install --global @dxos/[email protected]
npm install --global @dxos/[email protected]
npm install --global @dxos/[email protected]

export DX_DXNS_ENDPOINT="wss://blabla"

dx dxns resource list 

Expected output

An error about not being able to connect to blabla.

Actual output

Resources listed from DXNS setup in my profile.

@rzadp rzadp added the bug Something isn't working label Oct 22, 2021
@egorgripasov
Copy link
Contributor

@rzadp I think there might be some issues with cli-dxns installed via npm - I remember some issues with deps there;
Meantime, can you try this fix: https://github.com/dxos/braneframe/pull/268
(I've also updated flow to use new profile)

@rzadp
Copy link
Contributor Author

rzadp commented Oct 25, 2021

@egorgripasov With yarn, I made braneframe auto-deployment work. I'm renaming the issue to be just about npm and this is no longer a blocked for dxos/dxos#546

@rzadp rzadp changed the title CLI is not picking up ENV variables when installed globally CLI is not picking up ENV variables when installed globally via npm Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants