bitjson/typescript-starter

yarn watch not working on windows 10

Closed this issue · 6 comments

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    running yarn watch on windows 10 will produce this output

yarn watch v0.20.3
$ trash build && multiview [yarn watch:build] [yarn watch:unit]
module.js:472
    throw err;
    ^

Error: Cannot find module './build/Debug/buffertools.node'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (~~my repo~~\node_modules\buffertools\buffertools.js:26:20)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
error Command failed with exit code 1.

this is because multiview use buffertools which not support simple instalation on windows ( you need a C++ compiler & python 2.7 for that).

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Hey @bungcip – thanks for opening the issue!

Did you get some sort of error or warning when running yarn/yarn install for the first time? I'd like to continue using multiview in the watch task for machines which support it – is it possible to get multiview working on Windows?

I might just add a note to that section of the readme to inform people that it's possible to run yarn watch:build and yarn watch:unit separately (if they are unable / don't want to install the extra dependencies).

Ah, maybe a silly question – did you run yarn/yarn install before trying to run yarn watch? I just realized I didn't add that anywhere in the readme.

running yarn install will fail on windows 10 because my desktop don't have python installed. So I just use npm install, somehow npm install can skip the error...

D:\repo\typescript-starter-master>yarn install
yarn install v0.20.3
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.17: The platform "win32" is incompatible with this module.
info "fsevents@1.0.17" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[-/2] ⡀ waiting...
[2/2] ⡀ buffertools: using node@7.3.0 | win32 | x64
[-/2] ⡀ waiting...
[-/2] ⡀ waiting...
error D:\repo\typescript-starter-master\node_modules\buffertools: Command failed.
Exit code: 1
Command: C:\Windows\system32\cmd.exe
Arguments: /d /s /c node-gyp rebuild
Directory: D:\repo\typescript-starter-master\node_modules\buffertools
Output:
D:\repo\typescript-starter-master\node_modules\buffertools>if not defined npm_config_node_gyp (node "C:\Users\bungcip\AppData\Roaming\npm\node_modules\yarn\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.5.0
gyp info using node@7.3.0 | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\bungcip\AppData\Roaming\npm\node_modules\yarn\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\bungcip\AppData\Roaming\npm\node_modules\yarn\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack     at C:\Users\bungcip\AppData\Roaming\npm\node_modules\yarn\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:111:15)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\bungcip\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\repo\typescript-starter-master\node_modules\buffertools
gyp ERR! node -v v7.3.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Multiview is supported on windows, but you need Visual Studio (or msbuildtools) and python to compile it. On my notebook which have vs 2015 and python 2.7, I can run multiview without problem

npm config set python C:\Python27\python.exe
npm install -g multiview

I think the README need more explanation when installing on windows.

Build and run "multiview" on windows 10, but any command I pass to it returns error code 1 with no console output.

I think I just too early to say that multiview support windows 10 T_T. @tbko is right, I also cannot run it. It give me error about socket though.

@bungcip, @tbko thanks for the reports.

I think I'll try switching from multiview to concurrently. Hopefully that will make things simpler. 🚀