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

Make it work on Windows #867

Closed
Artoria2e5 opened this issue Jan 30, 2020 · 0 comments · Fixed by #868
Closed

Make it work on Windows #867

Artoria2e5 opened this issue Jan 30, 2020 · 0 comments · Fixed by #868

Comments

@Artoria2e5
Copy link
Contributor

Artoria2e5 commented Jan 30, 2020

Continuing the theme of #724... the global install does not work on Windows without WSL. Node seems to be passing stuff into cmd.

error message
> [email protected] postinstall C:\Users\eleth\AppData\Roaming\npm\node_modules\auspice
> npm run create-data-dir


> [email protected] create-data-dir C:\Users\eleth\AppData\Roaming\npm\node_modules\auspice
> ./scripts/create-data-dir.sh

'.' 不是内部或外部命令,也不是可运行的程序或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] create-data-dir: `./scripts/create-data-dir.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] create-data-dir script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\eleth\AppData\Roaming\npm-cache\_logs\2020-01-30T06_33_48_240Z-debug.log
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"10.8.x","npm":"6.2.x"} (current: {"node":"13.3.0","npm":"6.13
.1"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN [email protected] requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @types/react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\auspice\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! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run create-data-dir`
npm ERR! Exit status 1

(Yeah I know the error message is all chinese to you. It says '.' is not a command, an executable or a batch file.)

To fix this issue we can probably put "bash" in front of these commands so we are explicitly calling it with bash. This does bring out the additional problem of WSL shipping a binary called "bash" that never errors out. To fix this we can use "env bash" instead -- Cygwin/MSYS always ship with env, and they are 90% percent of the cases where people have a proper bash on Windows anyways.

Artoria2e5 added a commit to Artoria2e5/auspice that referenced this issue Jan 30, 2020
This should be all it takes to keep node from trying to run them with cmd on Windows. Closes nextstrain#867.
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

Successfully merging a pull request may close this issue.

1 participant