microsoft / microsoft/nodejstools
New TS projects require npm on the PATH
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 355
- PR merge metrics
- No merged PRs in 30d
Description
I have 2 projects, one created with VS 2019 and another with VS2019.1. The latter doesn't build because I don't have npm in the PATH.
Expected Behavior
When you create a project it just works or reports an unsupported configuration
Actual Behavior
When you create a project in VS 2019.1 it reports a build error out of the box. That is, empty typescript node.js console application doesn't build after the wizard.
- NTVS Version: 1.5.10424.1
- Visual Studio Version: 16.1.2
- Node.js Version: 10.15.3
Steps to Reproduce
- Ensure that neither npm nor nodejs are on your
PATH - Open VS 2019.1
- Create new project
- Filter by Language:Typescript
- Blank node.js console application
- Next
- Create
- Solution opens
- Press F6 to build
- It reports
error MSB3073:
------ Build started: Project: NodejsConsoleApp2, Configuration: Debug Any CPU ------
'npm' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\Node.js Tools\Microsoft.NodejsToolsV2.targets(60,5): error MSB3073: The command "npm run build" exited with code 9009.
Done building project "NodejsConsoleApp2.njsproj" -- FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========
At the same time an older project https://pastebin.com/MFEyHKyk works without requiring either npm or node to be in PATH.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the blank TypeScript Node.js console application build with node and npm absent from PATH. Inspect Microsoft.NodejsToolsV2.targets at line 60 and compare the generated .njsproj behavior with the older project linked in the report. Done means a newly created project either builds without requiring PATH entries or reports an unsupported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100