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

[1.4.2.6] nested node_modules from a meteor package not being installed #8349

Closed
sebakerckhof opened this issue Feb 10, 2017 · 10 comments
Closed

Comments

@sebakerckhof
Copy link
Contributor

@sebakerckhof sebakerckhof commented Feb 10, 2017

When upgrading from meteor 1.4.2.6 my application started to throw errors about modules not being found.

Upon inspection I found the module was a module that was a dependency of another npm package that was a dependency in package.js file of a local meteor package.
Downgrading to 1.4.2.3 fixes the problem.

So it's like this:
Meteor package -> Npm package 1 -> Npm Package 2
Npm package 2 is not being installed with meteor 1.4.2.6, but it is in meteor 1.4.2.3

The npm-shrinkwrap.json file inside the package/.npm folder contains only 1 entry: the direct dependency listed in the package.js file when using meteor 1.4.2.6. The one when using meteor 1.4.2.3 contains a whole list of entries

@sebakerckhof sebakerckhof changed the title [1.4.2.6] Problem with nested node_modules in meteor package [1.4.2.6] nested node_modules from a meteor package not being installed Feb 10, 2017
@sebakerckhof
Copy link
Contributor Author

@sebakerckhof sebakerckhof commented Feb 10, 2017

Update: strangely enough, I only seem to have this problem when using my private npm server.

So situation is like this:

  • Private or Public NPM server + Meteor 1.4.2.3 -> OK
  • Public NPM server + Meteor 1.4.2.6 -> OK
  • Private NPM server + Meteor 1.4.2.6 -> NOT OK
@benjamn
Copy link
Member

@benjamn benjamn commented Feb 10, 2017

Are these local Meteor packages? What happens if you delete the .npm directory entirely (should force it to be recreated)?

@sebakerckhof
Copy link
Contributor Author

@sebakerckhof sebakerckhof commented Feb 10, 2017

Yep, local meteor package. The behavior described above was by each time doing a meteor reset and deleting the package/.npm folder in between.
However, I've done some more tests now and now I was able to get it to work on 1.4.2.6. So it seems to be not reliably reproducible and therefore my findings above might not be correct.

As a side note, I just notice that the npm-shirnkwrap looks something like:

...
"azure-storage": {
      "version": "0.10.0",
      "resolved": "https://bin.barco.com/artifactory/api/npm/npm-virtual/azure-storage/-/azure-storage-0.10.0.tgz",
      "from": "azure-storage@0.10.0"
    },
    "bcrypt-pbkdf": {
      "version": "1.0.1",
      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
      "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0"
    },
    "bl": {
      "version": "1.0.3",
      "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz",
      "from": "bl@>=1.0.0 <1.1.0"
    },
...

azure-storage is the package defined in package.js and bin.barco.com is my private NPM server.

The other packages are dependencies of the azure-storage package. So this means the private NPM server settings are only used for the top-level dependency. But that's a different problem.

@StorytellerCZ
Copy link
Contributor

@StorytellerCZ StorytellerCZ commented Feb 11, 2017

I have similar problem as well. When trying to deploy to Galaxy about a node module not found (detect-indent). This did not appear when I tried to test run Meteor build with --production. After deleting the node_modules folder and installing it anew the problem went away for me.

@kubami
Copy link

@kubami kubami commented Feb 13, 2017

I had a same problem when trying to deploy with pm2-meteor.
I have managed to fix it with

  • removing node_modules
  • reinstalling all of them with meteor npm install
@abernix abernix added this to the Release 1.4.2.7 milestone Feb 13, 2017
@sebakerckhof
Copy link
Contributor Author

@sebakerckhof sebakerckhof commented Feb 13, 2017

@StorytellerCZ and @kubami are you on Meteor 1.4.2.6+? Because there seems to have been a fix to a similar issue that appeared in 1.4.2.5.

@abernix
Copy link
Member

@abernix abernix commented Feb 14, 2017

@sebakerckhof @StorytellerCZ @kubami Meteor 1.4.2.7 ( #8361 ) is currently published, but not (yet) recommended and rolls back the npm upgrade which caused this issue. Any chance either of you could confirm this is fixed in 1.4.2.7?

In addition! Meteor 1.4.3.1 is also published (and likewise, not recommended, yet!), and contains a more complete fix (#8363) to allow us to upgrade to NPM 4 and working with the new shrinkwrap mechanism it enforces. If you can provide any confirmation that it's working as you expect, that would also be appreciated!

@kubami
Copy link

@kubami kubami commented Feb 14, 2017

@abernix My problems arised when I updated meteor through meteor update. It was a 1.4.2.3 -> 1.4.2.6 update. I had the same symptoms as @sebakerckhof.
I have since fixed it by removing node_modules and reinstalling all npm deps npm install.

It would seem that it's not really a bug but an issue with updating process.

I have tried 1.4.3.1 now and it works perfectly :).
I will try to try 1.4.2.7 later.

@abernix
Copy link
Member

@abernix abernix commented Feb 14, 2017

@kubami Yup, there's an issue in Meteor 1.4.2.6 and it should be fixed in Meteor 1.4.2.7, as suggested above. Let us know if you find differently! Thanks for the report!

@sebakerckhof
Copy link
Contributor Author

@sebakerckhof sebakerckhof commented Feb 14, 2017

@abernix I just tried a couple of times a clean install with both 1.4.2.7 and 1.4.3.1 and I couldn't reproduce the problem anymore. So I think this one can be closed.

@benjamn benjamn closed this Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.