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

Transitive dependencies not included #149

Open
SimenB opened this issue Dec 9, 2016 · 10 comments
Open

Transitive dependencies not included #149

SimenB opened this issue Dec 9, 2016 · 10 comments
Assignees
Labels
Milestone

Comments

@SimenB
Copy link

SimenB commented Dec 9, 2016

See https://github.com/finn-no/cdn-uploader

Doing npm run create-executable && chmod +x cdn-uploader-linux-x64.nar && ./cdn-uploader-linux-x64.nar exec -a meep ugh gives

module.js:471
    throw err;
    ^

Error: Cannot find module '@google-cloud/common'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/cdn-dir/node_modules/@google-cloud/storage/src/index.js:24:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

@google-cloud/common is a dep of @google-cloud/storage.

@algesten
Copy link

algesten commented Dec 9, 2016

doesn't look like google cloud common is a regular dependency of this package. are you sure it isn't installed by some funky post install script? https://github.com/GoogleCloudPlatform/google-cloud-node/blob/master/package.json

@SimenB
Copy link
Author

SimenB commented Dec 9, 2016

@h2non
Copy link
Owner

h2non commented Dec 9, 2016

If the package is a runtime dependency of a dependant package in the node_modules tree, then it should be embedded accordingly in the nar archive.

Are you sure that the package has been installed properly and exists in node_modules/@google-cloud/storage?

I'm getting a native module compilation issue while installing that package (due to grpc installation).

@h2non h2non added the question label Dec 9, 2016
@h2non
Copy link
Owner

h2non commented Dec 10, 2016

I fix that issue using Python 2.7.

Looks like there's a bug here. That package should be resolved and embedded accordingly, but it does not.

As temporal workaround, I'd suggest creating explicitly adding @google-cloud/common as root level dependency in your package.json.

@h2non
Copy link
Owner

h2non commented Dec 10, 2016

I can confirm that the above workaround solves the issue.

I will dig into details about why that dependency is not properly embedded, but my suspect is that this can be related to organization-based package naming issue.

@h2non h2non added bug and removed question labels Dec 10, 2016
@h2non h2non self-assigned this Dec 10, 2016
@SimenB
Copy link
Author

SimenB commented Dec 10, 2016

Cool, thanks for the workaround, I'll test it Monday 😄

SimenB added a commit to finn-no/cdn-uploader that referenced this issue Dec 12, 2016
@SimenB
Copy link
Author

SimenB commented Dec 12, 2016

The workaround does work, thanks! Would of course prefer to avoid it, but it does work now, which is what matters 😄

@h2non
Copy link
Owner

h2non commented Dec 12, 2016

Cool. Hopefully, I will have some time this weekend to fix the issue.

@h2non h2non added this to the 0.4.1 milestone Dec 12, 2016
@SimenB
Copy link
Author

SimenB commented Feb 3, 2017

@h2non Any news here? 😄

@h2non
Copy link
Owner

h2non commented Feb 4, 2017

@SimenB unfortunately, not yet. I have other things in the queue, but will try to come up with a fix in the upcoming weeks.

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

No branches or pull requests

3 participants