New TS projects require npm on the PATH
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- node.js, typescript
- Domain
- build-system, devtools
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.
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.
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 355
- PR merge metrics
- No merged PRs in 30d
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.
More from microsoft/nodejstools
-
microsoft/nodejstools#2523 · 1 reaction · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/nodejstools#2519 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
microsoft/nodejstools#2517 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
microsoft/nodejstools#2514 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoft/nodejstools#2513 · 5 comments ·
All issues in microsoft/nodejstools
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100