-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Can't npm shinkwrap because of extraneous deps #92
Comments
@izs any idea what's this? We have a postinstall script that installs deps only on os x |
I think adding |
oh good idea! |
Agreed with @es128 . Running postinstall script on a Mac adds packages that aren't in package.json, which breaks |
+1. Breaks shrinkwrap for me too. The post install script is a bad idea. A post install message should be shown to the user that they need to install these libraries manually in their app. Or when the module is first used check for the library and throw an error that they need to install libs. There should also be a fallback if possible. Workaround
|
At this point, I agree that we have not been successful in finding a clean way to install fsevents conditionally, but I think it should remain possible for individual users to enable it. Even with I suggest switching the If I find the time today I'll prepare a PR. |
I would love some way to be able to instal fsevents when useful, and remove it when not. It dramatically improves performance on OS X, but we also need to make builds on other architectures. It seems safer to not have it by default, but allow OS X users to install it and use it. |
We're having a build issue with the 0.1.6 version of fsevents that was resolved in 0.2.0. I was hoping to shrinkwrap, but I was brought here. Would love to avoid forking chokidar for this little issue! |
@paulmillr can you push this to NPM? |
This will still be an issue even with optionalDependencies because of an npm bug: npm/npm#2679 (comment) (just fyi, I still think that declaring these as optional deps is a good thing) |
see paulmillr/chokidar#92 for details and resolution status
Workaround: If you don't need fsevents and recursive-readdir in your deployment env. Just go into node_modules/chokidar/node_modules and rm -rf those directories. Then do npm_shrinkwrap. if you do need them (if your env is OSX??). Go into node_modules/chokidar/package.json and add them as dependecies. |
@startswithaj you have to do this every time you upgrade which is far from ideal. My PR #106 fixes the problem by using |
@IgorMinar totally agree. Nice work on the fix. |
Side effect of the osx post-install script.
Thoughts feelings emotions?
npm ERR! Error: Problems were encountered
npm ERR! Please correct and try again.
npm ERR! extraneous: fsevents@0.1.6 /Users/nathanr/webclient/node_modules/chokidar/node_modules/fsevents
npm ERR! extraneous: recursive-readdir@0.0.2 /Users/nathanr/webclient/node_modules/chokidar/node_modules/recursive-readdir
...
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "shrinkwrap"
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
The text was updated successfully, but these errors were encountered: