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

tarball packed by slc build -ibp --scripts does not include the build/ subdirectory #10

Closed
sam-github opened this issue Oct 3, 2014 · 10 comments
Assignees
Labels

Comments

@sam-github
Copy link
Contributor

I did

cd /tmp/
npm install statsd
cd node_modules/statsd
slc build -ibp --scripts
tar -tf ../statsd-0.7.2.tar.gz | grep build  # nothing!
find . -print | grep build  # lots!

And the packfile produced did not include node_modules/node-syslog/build/....

@rmg
Copy link
Member

rmg commented Oct 3, 2014

I'm assuming the command was actually -ipb, otherwise slc build was not told to bundle the deps.

The binary parts of node-syslog are blocked from packing by node-syslog's own .npmignore file.

Something else to note is that statsd installed this way has a non-empty .npmignore file as generated from the .gitignore file in the repo it was published from.

@sam-github
Copy link
Contributor Author

there .npmignore file is meaningless, it only ignores node_modules, which is always ignored, but the bundledependencies was correctly updated. not sure what's going wrong.

and yes, I typed the command wrong

@sam-github
Copy link
Contributor Author

I think npm pack has a built-in behaviour to not pack build/ directories.

@sam-github
Copy link
Contributor Author

Yes, it does not pack build/ directories... we can't use it. Argh! Unless that behaviour is configurable.

@rmg
Copy link
Member

rmg commented Oct 3, 2014

It worked as expected when I deleted node_modules/node-syslog/.npmignore. That was the basis for my comment.

@sam-github
Copy link
Contributor Author

Ah, I was reading too fast... it's node-syslog's .npmignore that is the problem, and yes, you are right.

This is going to be a problem for us. Anybody who uses a .gitignore will have build in it, and that is OK. But anybody who writes a .npmignore is going to also have build/ in it... and that is going to make it impossible to pack binary dependencies. We'll need a fix.

@sam-github
Copy link
Contributor Author

@rmg, I think we have to write out own tarball (not use npm pack), and ignore all .npmignore files.

Do you agree?

You've used the npm tgz implementation, I think, any estimate on time to do that?

@chandadharap chandadharap assigned kraman and unassigned sam-github Oct 7, 2014
@rmg
Copy link
Member

rmg commented Oct 7, 2014

For the purposes of building a bundled tarball, what about just removing any .gitignore and .npmignore files found under node_modules/*?

@sam-github
Copy link
Contributor Author

That sounds like a better idea than mine.

@kraman
Copy link
Contributor

kraman commented Oct 8, 2014

Published to staging: strong-build@1.0.1-1

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