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

fix: support npm5’s --save default for postinstall script #760

Merged
merged 2 commits into from
Jun 3, 2017

Conversation

janl
Copy link
Member

@janl janl commented Jun 3, 2017

We now check PWD for node_modules, i.e.: we are only
in node_modules if we are doing npm install hoodie
somewhere, but not when running npm install in the
hoodie source directory.

Closes #746

We now check PWD for `node_modules`, i.e.: we are only
in `node_modules` if we are doing `npm install hoodie`
somewhere, but not when running `npm install` in the
hoodie source directory.
@janl janl requested a review from gr2m June 3, 2017 14:58
@janl
Copy link
Member Author

janl commented Jun 3, 2017

Ping @hoodiehq/maintainers <3

@gr2m
Copy link
Member

gr2m commented Jun 3, 2017

I can’t get hoodie to install with npm5, it fails with an Cannot read property 'find' of undefined error. I think the problem is isaacs/node-glob#341

$ node -v && npm -v && npm i hoodie
v8.0.0
5.0.2
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Cannot read property 'find' of undefined
npm ERR! Cannot read property 'find' of undefined

Does it work for you?

@janl
Copy link
Member Author

janl commented Jun 3, 2017

Works fine with:

v6.9.1
5.0.2

@gr2m
Copy link
Member

gr2m commented Jun 3, 2017

I get the same error

$ npm init -y
Wrote to /private/tmp/hoodie-issues-760/package.json:

{
  "name": "hoodie-issues-760",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}


$ npm i hoodie
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Cannot read property 'find' of undefined
npm ERR! Cannot read property 'find' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gregor/.npm/_logs/2017-06-03T17_52_05_262Z-debug.log
$ node -v
v6.9.5
$ npm -v
5.0.2

This is very weird...

@gr2m
Copy link
Member

gr2m commented Jun 3, 2017

okay my problem was unrelated and could be fixed via npm/npm#16677 (comment).

Checking the PR now

@gr2m gr2m merged commit 79dde6b into master Jun 3, 2017
@gr2m gr2m deleted the fix/764/npm5-postinstall branch June 3, 2017 18:25
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

Successfully merging this pull request may close these issues.

2 participants