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

Doesn't work when installed as a package dependency #30

Closed
cecilia-sanare opened this issue Jan 29, 2017 · 3 comments · Fixed by #31
Closed

Doesn't work when installed as a package dependency #30

cecilia-sanare opened this issue Jan 29, 2017 · 3 comments · Fixed by #31

Comments

@cecilia-sanare
Copy link
Contributor

cecilia-sanare commented Jan 29, 2017

When adding dns-proxy as a package dependency and trying to run it using a npm script.

  // ...
  "scripts": {
    "start": "dns-proxy"
  },
  "dependencies": {
    "dns-proxy": "*"
    // ...
  }
  // ...

It will try to load ../dns-proxy.js which doesn't exist relative to the bin that node runs.

Workaround

  // ...
  "scripts": {
    "start": "node node_modules/dns-proxy"
  }
  // ...
@ekristen
Copy link
Owner

Thanks to email alerts I totally missed these details when i was looking at this from my phone, sorry about that. I'll admit I never planned on this being used as a dependency. Let me take a look at the PR.

Off the top of my head you could always do this now and have it work node node_modules/dns-proxy/dns-proxy.js

@cecilia-sanare
Copy link
Contributor Author

That's actually what my workaround does except node reads the main property in the package.json on our behalf.

Also you've definitely created a rockstar module. This is so simple to setup compared to the alternatives.

@ekristen
Copy link
Owner

ekristen commented Jan 29, 2017 via email

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

Successfully merging a pull request may close this issue.

2 participants