madskristensen / NpmTaskRunner

Visual Studio extension
Other
88 stars 32 forks source link

yarn install/test/upgrade and custom scripts are not working #46

Closed nelsonmorais closed 7 years ago

nelsonmorais commented 7 years ago

Installed product versions

Description

Unfortunately, when executing yarn through the extension (which is really calling cmd.exe /C yarn ...) the following error appears:

C:\repo> cmd.exe /c yarn install
C:\Program Files (x86)\Yarn\bin\yarn.js:61
Process terminated with code 1.
      throw err;
      ^
Error: Implement me. Unknown stdin file type!
    at process.getStdin [as stdin] (internal/process/stdio.js:82:15)
    at ConsoleReporter.BaseReporter (C:\Program Files (x86)\Yarn\lib\reporters\base-reporter.js:64:39)
    at ConsoleReporter (C:\Program Files (x86)\Yarn\lib\reporters\console\console-reporter.js:56:5)
    at Object.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli\index.js:222:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)

Instead of something like:

C:\repo> cmd.exe /c yarn install
yarn install v0.19.1
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.56s.

Steps to recreate

  1. From a cmd prompt run yarn install from the folder where package.json is
  2. Make sure that a yarn.lock file was created on the same folder as package.json
  3. Open VS2015, open Task Runner Explorer
  4. Try to execute install (the yarn install) or any other yarn command from the Task Runner Explorer to see the error

Current behavior

see above

Expected behavior

see above

Other relevant links

https://github.com/MiguelAlho/YarnTaskRunner https://github.com/yarnpkg/yarn/pull/1000

captain-steel commented 7 years ago

I'm facing the same error today. yarn

yarn : v0.19.1 Visual Studio : 2015 Professional NPM Task Runner : v1.4.81 WebPack Task Runner : v1.5.79

scottaddie commented 7 years ago

@nelsonmorais @wassim-azirar Which version of Windows are you both running?

captain-steel commented 7 years ago

@scottaddie I'm using Windows 7

nelsonmorais commented 7 years ago

@scottaddie Windows 7 Enterprise

scottaddie commented 7 years ago

@wassim-azirar @nelsonmorais I see this problem on Windows 7 too, but it works great on Windows 10 for me. Trying to confirm whether the problem is isolated to Windows 7.

scottaddie commented 7 years ago

I submitted PR https://github.com/yarnpkg/yarn/pull/2837 to address this problem, and it has already been merged. Once a new Yarn release is made available with this fix, I will test this extension once again on Windows 7.

nelsonmorais commented 7 years ago

@scottaddie Ok, thanks!

scottaddie commented 7 years ago

@nelsonmorais @wassim-azirar Now that Yarn v0.22.0 has been released, I'm happy to report that this issue is resolved on Windows 7. Please install that version of Yarn and try the extension again. I've confirmed that it works on my machine.