You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When running inside a headless process such as within Visual Studio's NPM Task Runner, any ng command throws an error due to process.stdin not being implemented #4870
Add the app to an ASP.NET Core project in VS2015 with outputs set to wwwroot
Attempt to run one of the npm scripts using the NPM Task Runner, such as test, which results in the log below
The log given by the failure.
`
ng test
internal/process/stdio.js:82
throw new Error('Implement me. Unknown stdin file type!');
^
Error: Implement me. Unknown stdin file type!
at process.getStdin [as stdin] (internal/process/stdio.js:82:15)
at D:\DEV\PoC\Ang2App\src\Ang2App\node_modules@angular\cli\bin\ng:149:27
at D:\DEV\PoC\Ang2App\src\Ang2App\node_modules\resolve\lib\async.js:45:21
at ondir (D:\DEV\PoC\Ang2App\src\Ang2App\node_modules\resolve\lib\async.js:188:31)
at D:\DEV\PoC\Ang2App\src\Ang2App\node_modules\resolve\lib\async.js:154:39
at onex (D:\DEV\PoC\Ang2App\src\Ang2App\node_modules\resolve\lib\async.js:94:22)
at D:\DEV\PoC\Ang2App\src\Ang2App\node_modules\resolve\lib\async.js:25:18
at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\f_ceotto\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "test" "--color=always"
npm ERR! node v6.9.5
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ang2-app@0.1.0 test: ng test
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ang2-app@0.1.0 test script 'ng test'.
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 ang2-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ang2-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ang2-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\f_ceotto\AppData\Roaming\npm-cache_logs\2017-02-21T12_04_28_453Z-debug.log
Process terminated with code 1.
`
Mention any other details that might be useful.
This is a common issue with a few packages that use process.stdin when running in Windows. A common solution is to replace the process.stdin with an event emitter when running in a headless environment in Windows and I can submit a pull request that addresses the issue like that, but I've also attached a patch with the same:
Activity
fix: when running in a headless process in win32 the lack of process.…
fix(@angular/cli): Headless win32 now works as expected (#4871)
fix(@angular/cli): Headless win32 now works as expected (angular#4871)
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(@angular/cli): Headless win32 now works as expected (angular#4871)