installed packages do not seem to be included in output
jackboberg opened this issue · 8 comments
Trying to track down errors we are seeing in deploys on Modulus. Here is an example that shows that maybe meteor build
is not honoring the root package.json
dependencies...?
[~/sample-apps/meteor]
› meteor create simple-todos
Created a new Meteor app in 'simple-todos'.
To run your new app:
cd simple-todos
meteor
If you are new to Meteor, try some of the learning resources here:
https://www.meteor.com/learn
[~/sample-apps/meteor]
› cd simple-todos
[~/sample-apps/meteor/simple-todos]
› meteor npm i left-pad
left-pad@1.0.2 node_modules/left-pad
[~/sample-apps/meteor/simple-todos]
› cat package.json
{
"name": "simple-todos",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"left-pad": "~1.0.2",
"meteor-node-stubs": "~0.2.0"
}
}
[~/sample-apps/meteor/simple-todos]
› demeteorizer
Demeteorizing application...
WARNING: The output directory is under your source tree.
Your generated files may get interpreted as source code!
Consider building into a different directory instead
meteor build ../output
Demeteorization complete.
[~/sample-apps/meteor/simple-todos]
› cd .demeteorized
[~/sample-apps/meteor/simple-todos/.demeteorized]
› ag left-pad
left-pad
is nowhere to be found in my output...
It's very likely that the issue is that the CLI is skipping the node_modules
directory. Try deploying with the --include-modules
or -m
flag.
Even though our meteor build image respects the root package.json, wouldn't this still be a problem with the meteor build
command?
@fiveisprime This is all local. I'm trying to demonstrate that the node_modules
directory produced by meteor build
(and therefore demeteorizer
) does not take into account the root package.json
.
Does XervoIO/docker-build-meteor#12 resolve this issue? Since we can't really force the meteor build
command to do anything, we added the logic in the build image.
@jackboberg @fiveisprime I don't see this as an issue anymore. Do we want to close this?
@theworkflow How is it resolved? We made changes to the Modulus build servers to mitigate this, but the issue still exists, no?
I wouldn't think so because this is only a wrapper around the meteor build
command. Per their documentation, they don't even install the root dependencies. If we want this module to handle that then we can make that happen. I just thought it was outside of what the meteor build
command does.
this entire project is about wrapping meteor build
to make it more safe and consistent..this issue seems like exactly the kind of thing demeteorizer
should handle IMO.