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

Installation fails on Windows #5

Open
cannam opened this issue May 2, 2017 · 2 comments
Open

Installation fails on Windows #5

cannam opened this issue May 2, 2017 · 2 comments

Comments

@cannam
Copy link
Member

cannam commented May 2, 2017

I made the schoolboy error of bringing a Windows laptop along with me today, and I thought I'd see how npm gets on with our packages on it. I'm running everything from Powershell (because that is the Windows Way) rather than trying to use the Windows Subsystem for Linux or whatever.

It doesn't work that well, it turns out. Although I could install most of the packages needed by ugly-duckling, piper fails because it explicitly tries to run Unix shell commands:

PS C:\Users\Chris\Documents\ugly-duckling> npm install

> [email protected] postinstall C:\Users\Chris\Documents\ugly-duckling\node_modules\piper
> npm run prepublish


> [email protected] prepublish C:\Users\Chris\Documents\ugly-duckling\node_modules\piper
> npm run clean && npm run build-src-only && cp -r dist/ts/* .


> [email protected] clean C:\Users\Chris\Documents\ugly-duckling\node_modules\piper
> rm -rf fft *.js *.js.map *.d.ts dist extractors client-stubs fft protocols servers

'rm' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "clean"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] clean: `rm -rf fft *.js *.js.map *.d.ts dist extractors client-stubs fft protocols servers`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clean script 'rm -rf fft *.js *.js.map *.d.ts dist extractors client-stubs fft protocols servers'.
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 piper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rm -rf fft *.js *.js.map *.d.ts dist extractors client-stubs fft protocols servers
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs piper
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls piper
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Chris\Documents\ugly-duckling\node_modules\piper\npm-debug.log

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "prepublish"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prepublish: `npm run clean && npm run build-src-only && cp -r dist/ts/* .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'npm run clean && npm run build-src-only && cp -r dist/ts/* .'.
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 piper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run clean && npm run build-src-only && cp -r dist/ts/* .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs piper
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls piper
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Chris\Documents\ugly-duckling\node_modules\piper\npm-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"
win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `npm run prepublish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'npm run prepublish'.
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 piper package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run prepublish
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs piper
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls piper
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Chris\Documents\ugly-duckling\npm-debug.log
@LucasThompson
Copy link
Member

Ah, damn. Big oversight from me there.

Left as-is, this would actually work fine for a consumer of piper if I got rid of that "postinstall" script and published this to npm. Or included pre-compiled stuff in the repo which is quite common.

I'll have to script it for a more portable solution. The build process is pretty gross and could probably be simplified.

@cannam
Copy link
Member Author

cannam commented May 2, 2017

fwiw, the waves-ui bundle procedure had basically the same problem (it shelled out to "find" to pick up the files to transpile). That was also pretty gross anyway of course. I pushed a fix this morning.

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

No branches or pull requests

2 participants