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

nodeshift potentially hangs and grows archive file indefinitely #200

Closed
ghost opened this issue Mar 14, 2018 · 4 comments · Fixed by #201
Closed

nodeshift potentially hangs and grows archive file indefinitely #200

ghost opened this issue Mar 14, 2018 · 4 comments · Fixed by #201
Assignees

Comments

@ghost
Copy link

ghost commented Mar 14, 2018

If you don't specify files in package.json (e.g. https://github.com/bucharest-gold/nodejs-rest-http/blob/master/package.json#L30), app could hang and grow indefinitely when running npm run openshift.

Example project:
https://github.com/rhoads-zach/swagger-app

to reproduce:

git clone https://github.com/rhoads-zach/swagger-app.git
cd swagger-app
npm install && npm run openshift

After 1 minute check tmp/nodeshift/build/archive.tar and notice it is several GB and growing.

@helio-frota
Copy link
Member

@rhoads-zach hi,

Maybe this is something related to the missing files section on package.json.

please try to add the files section example:
https://github.com/bucharest-gold/mean-booster/blob/master/package.json#L19-L24

@ghost
Copy link
Author

ghost commented Mar 14, 2018

thanks @helio-frota that does resolve the issue, but i believe @lholmquist is looking into why this is happening in general

@lholmquist
Copy link
Member

@helio-frota yea, that would help.

i noticed something intersting, if i don't have a node_modules folder, the archive happens fine. but with the node_modules folder things get crazy

Probably will have to ignore that directory when archiving with out the files prop

@lholmquist lholmquist self-assigned this Mar 14, 2018
@lholmquist lholmquist added the bug label Mar 14, 2018
@ghost
Copy link
Author

ghost commented Mar 14, 2018

FYI, i applied the files fix to my repo. in case you still need the old version to reproduce, its here:
https://github.com/rhoads-zach/swagger-app/tree/50af94cbdcc6a7f08c254c300738b28fa7628554

lholmquist added a commit to lholmquist/nodeshift that referenced this issue Mar 14, 2018
…d in the package.json

* If no files property was found in the package.json, nodeshift would archive(tar) the current working directory.  When there was a node_modules folder in that directory, which usually happens, the archive would grow to a crazy size.

* The archiver has been updated to no longer include the node_modules, .git and tmp folders.

It is still recommeneded to use the files property though.

fixes nodeshift#200
lholmquist added a commit to lholmquist/nodeshift that referenced this issue Mar 14, 2018
…d in the package.json

* If no files property was found in the package.json, nodeshift would archive(tar) the current working directory.  When there was a node_modules folder in that directory, which usually happens, the archive would grow to a crazy size.

* The archiver has been updated to no longer include the node_modules, .git and tmp folders.

It is still recommeneded to use the files property though.

fixes nodeshift#200
@ghost ghost removed the in progress label Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants