-
Notifications
You must be signed in to change notification settings - Fork 3k
npm@3 should not be trying to install modules that arch/os say are incompatible #8921
Comments
It shouldn't actually be trying to install an optional fsevents on Windows. (fsevents marks itself as OS specific.) I'll be correcting this… |
I saw that fsevents is set to only run for OSX in the gyp file but I couldn't get it to respect that. Here are dumps of my environment. I'd be happy to test. Still think that a global no-optional setting would be helpful (unless I am missing something). from ZSH:
|
I updated the title to reflect the underlying cause |
Welp, I've found the code that does this. It exists. I didn't forget it. =D It just, apparently, doesn't work for some reason. And apparently we didn't have any tests for it. So we'll be fixing both of those things. |
Awesome! All the recent fixes with npm 3 have been making my life much easier. |
\o/ Awesome, glad to hear it! =) |
This does a few things: 1. It fixes the calls to npm-install-checks– we were passing a read-package-tree node, and it wants package.json data. 2. This moves checks to be at "install" time (resolveWithNewModule), so they happen earlier. 3. Arguments passed in from the command line are checked even earlier. This is where "don't install yourself" checks are done. PR-URL: #9039 Fixes: #8637 Fixes: #8921
This does a few things: 1. It fixes the calls to npm-install-checks– we were passing a read-package-tree node, and it wants package.json data. 2. This moves checks to be at "install" time (resolveWithNewModule), so they happen earlier. 3. Arguments passed in from the command line are checked even earlier. This is where "don't install yourself" checks are done. PR-URL: #9039 Fixes: #8637 Fixes: #8921
Hey! Good news, this should be fixed in the just released |
@iarna I just installed and it brought down C:\Program Files (x86)\Microsoft Visual Studio 14.0> npm i npm@3.x-latest -g
C:\Program Files\nodejs\npm -> C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
C:\Program Files\nodejs
└── npm@3.1.3
npm WARN EPACKAGEJSON C:\Program Files\nodejs No description
npm WARN EPACKAGEJSON C:\Program Files\nodejs No repository field.
npm WARN EPACKAGEJSON C:\Program Files\nodejs No README data
npm WARN EPACKAGEJSON C:\Program Files\nodejs No license field.
C:\Program Files (x86)\Microsoft Visual Studio 14.0> Should I install it using |
Yup, or |
@iarna This happens again in NPM 3.5.0.... |
confirmed that this happens in NPM 3.5.0 |
Same here:
when trying to install fsevents |
Let's move on to #10768 for discussion. I've opened this bug for npm 3.5.0. |
I still have this issue in 3.10.3, and now that #10768 has been closed and locked, it seems that this would be the place to pick it up. Just to be clear, this is not just an issue of having a confusing warning printed to the console. My build actually terminates with an error code and no |
Using Windows 8.1 and NPM 3.1 I seem to always get node-gyp errors for packages that don't affect the Windows platform (fsevents). If I use --no-optional on all npm installs, I don't see the errors. Is there any way to set a default to always use --no-optional? Simple export of an environment variable like npm_config_install_nooptional would solve a lot of short-term Windows issues.
Maybe something like this already exists and I just can't find it?
The text was updated successfully, but these errors were encountered: