Skip to content

npm install removes the build dir !? #363

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

Closed
strk opened this issue May 28, 2013 · 6 comments
Closed

npm install removes the build dir !? #363

strk opened this issue May 28, 2013 · 6 comments

Comments

@strk
Copy link
Contributor

strk commented May 28, 2013

[strk@gnash:/usr/src/node/modules/node-postgres(master-commit)] npm install

> [email protected] install /home/src/node/modules/node-postgres
> node-gyp rebuild || (exit 0)

make: Entering directory `/home/src/node/modules/node-postgres/build'
  CXX(target) Release/obj.target/binding/src/binding.o
  SOLINK_MODULE(target) Release/obj.target/binding.node
  SOLINK_MODULE(target) Release/obj.target/binding.node: Finished
  COPY Release/binding.node
make: Leaving directory `/home/src/node/modules/node-postgres/build'

> [email protected] prepublish /home/src/node/modules/node-postgres
> rm -r build || (exit 0)

Removing the "prepublish" script from package.json fixes this

@strk
Copy link
Contributor Author

strk commented May 28, 2013

Seems to be an upstream issue: https://github.com/isaacs/npm/issues/3059

@freewil
Copy link

freewil commented May 28, 2013

What is the point of running rm -r build for the prepublish script? Was it so it wasn't published to npm? If that is why, it looks like build/ is already in .npmignore

@strk
Copy link
Contributor Author

strk commented May 29, 2013

Good point, @freewil. Sounds like a good workaround!
@brianc, need a pull request ?

@brianc
Copy link
Owner

brianc commented Jun 3, 2013

There was a time when .npmignore did not correctly ignore directories and so I occasionally published the build dir, which broke everything when doing an install. It was probably fixed in the 2 years since I ran into the issue, but I never retested since removing the build dir is a simple fix. Is it causing issues?

@strk
Copy link
Contributor Author

strk commented Jun 3, 2013

well, yes, as you can't use the native bindings after you npm install

@brianc
Copy link
Owner

brianc commented Jun 3, 2013

dang. just read the npm issue comments. I'll test this out & fix it as needed asap.

@brianc brianc closed this as completed in 43a8cd1 Jun 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants