RxJS version: 5.0.0-beta.5
Code to reproduce:
npm installExpected behavior:
Code runs without errors
Actual behavior:
npm ERR! Failed at the @reactivex/[email protected] prepublish script 'rm -rf ./typings && typings install && npm run build_all'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @reactivex/rxjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! rm -rf ./typings && typings install && npm run build_all
Additional information:
Reason: I use Windows so rm -rf command is not available in cmd, I changed it to use rimraf package for rm -rf and ncp package for copying, since both rm and cp commands are not available in cmd.
I know it's painful to deal with scripts on windows machine in general (I am also windows user) and trying to improve this as much. Instead of replacing individual command into modules, planning to introduce cross platform layers for common shell command, such as shx / cash (https://github.com/shelljs/shx / https://github.com/dthree/cash).
Meanwhile in general I recommend to try console emulators if it's ok to install it, such as cmder (http://cmder.net/) or msys2 (http://msys2.github.io/) which provides linux shell environment on windows.
Yeah, I use powershell which has aliases rm for cmdlet Remove-Item and cp for cmdlet Copy-Item. But it seems that npm during build still uses cmd.exe. So I guess the same would happen for cmder, which I used also :smile:
It's not a problem - I just figured that with adding two npm modules and minor changes in package.json you could build it as it is on Windows. It's just a suggestion.
npm during build still uses cmd.exe.
: that is correct, but not for this case. I'm using msys2, and this command affected by shell you're using.
you could build it as it is on Windows. It's just a suggestion.
: Thanks again, I'm fully aware as I'm windows user (in fact I don't use *nix machine usually :) ) and it's absolutely will be taken care of. Appreciate for suggestion.
I'm using gulp. See my suggestion #1592 with gulpfile published
Assuming your git install is in the default path, just add C:\Program Files\Git\usr\bin to your %PATH% and the issue will disappear.
The only problem I've had on windows is lack of blob support for tslint.
@xmichaelx @Igorbek latest check in enables most frequent npm scripts works with plain windows cmd prompt. Yes, it's not gulp but I believe works in most cases.
Use robocopy to create a build script:
rd /s/q .\dist
mkdir dist
robocopy *.* . .\dist /E /XF *-test.js *.conf.js *.md *.bat *.json /XD e2e* test* node_modules* dist jasmine* nbproject
===
rd /s/q .\dist && mkdir dist && robocopy *.* . .\dist /E /XF *-test.js *.conf.js *.md *.bat *.json /XD e2e* test* node_modules* dist jasmine* nbproject
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Assuming your git install is in the default path, just add
C:\Program Files\Git\usr\binto your%PATH%and the issue will disappear.The only problem I've had on windows is lack of blob support for
tslint.