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

Remove postinstall step #1419

Merged
merged 1 commit into from
Oct 19, 2021
Merged

Remove postinstall step #1419

merged 1 commit into from
Oct 19, 2021

Conversation

jameshadfield
Copy link
Member

@jameshadfield jameshadfield commented Oct 17, 2021

The postinstall script created ./data and ./narratives directories, but is now obsolete. The get-data script will create its own ./data directory, and the docs identify when this should be run. There is no script to automatically fetch narratives. Removing this from the postinstall step means that env is not necessary for an auspice install, which should facilitate installation on windows.

This should be npm installable via npm install --global nextstrain/auspice#windows

Testing:

  • heroku rebuild of auspice
  • nextstrain.org rebuild
  • npm global install on MacOS
  • npm global install on windows
  • from source install

The postinstall script created `./data` and `./narratives` directories, but is now obsolete. The `get-data` script will create its own `./data` directory, and the docs identify when this should be run. There is no script to automatically fetch narratives.

Removing this from the postinstall step means that `env` is not necessary for an auspice install, which should facilitate installation on windows.
@jameshadfield jameshadfield temporarily deployed to auspice-windows-fwtgogx3fcgoyx October 17, 2021 22:20 Inactive
@huddlej
Copy link
Contributor

huddlej commented Oct 18, 2021

Thanks, @jameshadfield! I think this will eventually work, but the installation recommended above errors with a missing dependency and lack of pre-built binaries. Node thinks it needs a C++ compiler to build the missing binaries. Here is the full error message:

C:\Users\huddl>npm install --global nextstrain/auspice#windows
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > iltorb@2.4.5 install C:\Users\huddl\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-2d4f6bec\node_modules\iltorb
npm ERR! prepareGitDep > node ./scripts/install.js || node-gyp rebuild
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep C:\Users\huddl\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-2d4f6bec\node_modules\iltorb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--also=dev` instead.
npm ERR! prepareGitDep info looking for cached prebuild @ C:\Users\huddl\AppData\Roaming\npm-cache\_prebuilds\ee308d-iltorb-v2.4.5-node-v83-win32-x64.tar.gz
npm ERR! prepareGitDep http request GET https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-win32-x64.tar.gz
npm ERR! prepareGitDep http 404 https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v83-win32-x64.tar.gz
npm ERR! prepareGitDep WARN install No prebuilt binaries found (target=14.18.0 runtime=node arch=x64 libc= platform=win32)
npm ERR! prepareGitDep gyp ERR! find VS
npm ERR! prepareGitDep gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! prepareGitDep gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! prepareGitDep gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
npm ERR! prepareGitDep gyp ERR! find VS looking for Visual Studio 2015
npm ERR! prepareGitDep gyp ERR! find VS - not found
npm ERR! prepareGitDep gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! prepareGitDep gyp ERR! find VS
npm ERR! prepareGitDep gyp ERR! find VS **************************************************************
npm ERR! prepareGitDep gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! prepareGitDep gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! prepareGitDep gyp ERR! find VS For more information consult the documentation at:
npm ERR! prepareGitDep gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! prepareGitDep gyp ERR! find VS **************************************************************
npm ERR! prepareGitDep gyp ERR! find VS
npm ERR! prepareGitDep gyp ERR! configure error
npm ERR! prepareGitDep gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! prepareGitDep gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! prepareGitDep gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! prepareGitDep gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! prepareGitDep gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! prepareGitDep gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! prepareGitDep gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! prepareGitDep gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! prepareGitDep gyp ERR! stack     at ChildProcess.exithandler (child_process.js:390:5)
npm ERR! prepareGitDep gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
npm ERR! prepareGitDep gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
npm ERR! prepareGitDep gyp ERR! System Windows_NT 10.0.19043
npm ERR! prepareGitDep gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! prepareGitDep gyp ERR! cwd C:\Users\huddl\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-2d4f6bec\node_modules\iltorb
npm ERR! prepareGitDep gyp ERR! node -v v14.18.0
npm ERR! prepareGitDep gyp ERR! node-gyp -v v5.1.0
npm ERR! prepareGitDep gyp ERR! not ok
npm ERR! prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):
npm ERR! prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\jest-haste-map\node_modules\fsevents):
npm ERR! prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! prepareGitDep npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\jest-circus\node_modules\fsevents):
npm ERR! prepareGitDep npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! iltorb@2.4.5 install: `node ./scripts/install.js || node-gyp rebuild`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the iltorb@2.4.5 install script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     C:\Users\huddl\AppData\Roaming\npm-cache\_logs\2021-10-18T16_41_41_623Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\huddl\AppData\Roaming\npm-cache\_logs\2021-10-18T16_41_41_815Z-debug.log

Looking at the release page for the iltorb package that 404s, there is an older version available for Windows here:

https://github.com/nstepien/iltorb/releases/download/v2.4.5/iltorb-v2.4.5-node-v79-win32-x64.tar.gz

I don't know enough about npm's bundling logic, but presumably the pre-built binaries for these packages get included in a full Auspice release as opposed to a GitHub branch installation?

@jameshadfield
Copy link
Member Author

Thanks @huddlej. Regardless of whether this fixes the windows installation issues, I think it is a beneficial change so I'm going to merge for the next release, then we can re-test and see if this helped with windows 🤞 .

@jameshadfield jameshadfield merged commit c871641 into master Oct 19, 2021
@jameshadfield jameshadfield deleted the windows branch October 19, 2021 20:23
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 this pull request may close these issues.

2 participants