Skip to content

Microsoft.VisualStudio.JavaScript.SDK fails to generate package.g.props and then to do npm run build #42741

Open
@beppemarazzi

Description

@beppemarazzi

I don't know if this is the right place to report issues about Microsoft.VisualStudio.JavaScript.SDK... but i couldn't find any better place...

If package.json contains "similar" npm dependencies (similar in the sense that striping out non alphanumeric chars from their names, the remaining parts are equal) the task GeneratePackageJsonProps invoked from target GeneratePackageJsonProps silently fails.
Raising the build logging (i.e. to verbose) appears an error (the task is trying to add duplicated keys in a dictionary).
In this case the file package.g.props is not gegerated and then there are a lot of issues (i.e. npm run build is not executed...)

Example of "conflicting" dependecies (don't ask me why but yes, i need both in my project!!!):

"dependencies": {
  "@babylonjs/inspector": "^7.19.0",
  "babylonjs-inspector": "^7.19.0",

in this case both names @babylonjs/inspector and babylonjs-inspector are "mangled" by the task GeneratePackageJsonProps and becomes babylonjsinspector causing the issue...

i found a workaround using an npm alias:

"dependencies": {
  "@babylonjs/inspector": "^7.19.0",
  "standalone-babylonjs-inspector": "npm:babylonjs-inspector@^7.19.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-esprojIssues related to the Javascript project systemuntriagedRequest triage from a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions