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

Incompatibility with Windows #20

Closed
GCinellu opened this issue May 14, 2015 · 7 comments
Closed

Incompatibility with Windows #20

GCinellu opened this issue May 14, 2015 · 7 comments
Assignees

Comments

@GCinellu
Copy link
Collaborator

Running
npm install belle

on Windows 8.1, I get the following error:

545 error Windows_NT 6.3.9600
546 error argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "belle"
547 error node v0.12.2
548 error npm v2.7.4
549 error code ELIFECYCLE
550 error belle@0.0.17 postinstall: rm -rf node_modules/react/ && rm -rf node_modules/underscore/
550 error Exit status 1
551 error Failed at the belle@0.0.17 postinstall script 'rm -rf node_modules/react/ && rm -rf node_modules/underscore/'.
551 error This is most likely a problem with the belle package,
551 error not with npm itself.
551 error Tell the author that this fails on your system:
551 error rm -rf node_modules/react/ && rm -rf node_modules/underscore/
551 error You can get their info via:
551 error npm owner ls belle
551 error There is likely additional logging output above.

Apparently, as for line 551, it tries to execute this command :
rm -rf node_modules/react/ && rm -rf node_modules/underscore/

which of course is not valid on Windows.

Have anyone had better luck installing it?

@nikgraf
Copy link
Owner

nikgraf commented May 17, 2015

Hey @GCinellu

Unfortunately when typing npm install the in npm 1 & 2 the peerDependencies are installed as well. By removing them I could make sure the setup allows to make changes to Belle while instantly reviewing them in the examples playground or docs.

According to the docs npm 3 won't have these issues:

NOTE: npm versions 1 and 2 will automatically install peerDependencies if they are not
explicitly depended upon higher in the dependency tree. In the next major version of
npm (npm@3), this will no longer be the case. You will receive a warning that the
peerDependency is not installed instead. 

https://docs.npmjs.com/files/package.json
http://blog.npmjs.org/post/110924823920/npm-weekly-5

I'm happy to merge any pull-request that improves the situation, but for now I'm not sure how.

@blakeembrey
Copy link

@nikgraf I would just remove postinstall. NPM will use the parent react version without trying to force it. The warning is only to say that installation won't happen automatically.

@jpuri
Copy link
Collaborator

jpuri commented Jul 16, 2015

It still had more issues, I tried running belle on windows box 2 days back. Need to spend more time to fix that :)

@blakeembrey
Copy link

Yes, looking at the package.json and most scripts will give pain on Windows. The only relevant script for consumers is postinstall though, and trying to delete a local react module isn't something you really need to do anyway (it shouldn't even be installing locally there if someone is consuming it, hence peerDependency - perhaps it's left over from linking and trying to avoid duplicate react modules?).

@jpuri
Copy link
Collaborator

jpuri commented Jul 16, 2015

You are right postinstall is the exact pain point, the way we are using dependencies can definitely be improved. Let me spend more time trying to fix this ( I will probably have more queries for you then).

We also had some troubles with some babel configurations like this '--optional='es7.classProperties'' on windows.

@jpuri jpuri self-assigned this Jul 19, 2015
@nikgraf
Copy link
Owner

nikgraf commented Jul 28, 2015

Fixed the npm install belle issue for windows with #159

@blakeembrey thanks a lot for pointing that out. I missed that postinstall also runs when people do npm install belle. It was intended as fix for the development environment, because peerDepedencies even get install when you do npm install in the library.

@nikgraf nikgraf closed this as completed Jul 28, 2015
@nikgraf
Copy link
Owner

nikgraf commented Jul 28, 2015

@GCinellu We fixed the Windows issues 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants