meteor icon indicating copy to clipboard operation
meteor copied to clipboard

meteorNpm portable file marker causes npm shrinkwrap to fail on organization npm modules

Open egoldblum opened this issue 10 years ago • 3 comments

$ cat .meteor/release
[email protected]
$ meteor npm --version
3.9.6
$ ls -la node_modules/\@workpop/
total 8
drwxr-xr-x    4 egoldblum  staff   136 Jun 24 12:45 ./
drwxr-xr-x  272 egoldblum  staff  9248 Jun 24 12:45 ../
-rw-r--r--    1 egoldblum  staff     5 Jun 24 12:11 .meteor-portable
drwxr-xr-x   10 egoldblum  staff   340 Jun 24 12:45 optimistic-middleware/

As you can see, we have a npm module installed that is not in a top level directory under node_modules due to the fact that this belongs to an npm organization.

https://www.npmjs.com/package/@workpop/optimistic-middleware

Before running meteor build, the .meteor-portable does not exist in this directory and meteor npm shrinkwrap works as expected. After running meteor build, this .meteor-portable file causes subsequent shrinkwrapping attempts to fail as this file is not in a npm module directory but is under node_modules

<snip>
npm ERR! Darwin 15.3.0
npm ERR! argv "node" "/Users/egoldblum/.meteor/packages/meteor-tool/.1.3.4.qz3c1w++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm" "shrinkwrap"
npm ERR! node v0.10.45
npm ERR! npm  v3.9.6

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! extraneous: undefined /Users/egoldblum/workpop/Workpop-Web/node_modules/@workpop/.meteor-portable
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/egoldblum/workpop/Workpop-Web/npm-debug.log

.meteor-portable should not be placed if the directory is not a npm module. Usually top level directories in node_modules are, but not always.

https://github.com/meteor/meteor/blob/d71ebb6c28d9621c4a4f29e58429b9f551178512/tools/isobuild/meteor-npm.js#L261

egoldblum avatar Jun 24 '16 19:06 egoldblum

Same bug as https://github.com/kadirahq/react-storybook/issues/181

egoldblum avatar Jun 24 '16 19:06 egoldblum

What's the progress on this @benjamn ? any timeline for when it'll be fixed? This is super annoying, and slows down both local development and deployments to our development environments

abhiaiyer91 avatar Jun 29 '16 21:06 abhiaiyer91

I'm planning a Meteor 1.3.4.2 bug fix release, with this fix included. Please run meteor update --release 1.3.4.2-beta.0 if you would like to upgrade your apps immediately.

benjamn avatar Jul 01 '16 21:07 benjamn