Skip to content

sm new project: scaffold pins @simplemodule/client@^0.0.37 but npm only has 0.0.36 (npm install fails: notarget) #219

Description

@antosubash

Summary

sm new project (CLI 0.0.37) pins the frontend package @simplemodule/client to ^0.0.37, but that version is not published to npm (latest is 0.0.36). npm install fails immediately.

Repro

sm new project InvoiceManager   # CLI 0.0.37, pins SimpleModule.* NuGet 0.0.37
cd InvoiceManager
npm install

Actual

npm error notarget No matching version found for @simplemodule/client@^0.0.37.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
$ npm view @simplemodule/client dist-tags
{ latest: '0.0.36' }

So the NuGet packages were published at 0.0.37 but the npm @simplemodule/client (and likely the other @simplemodule/* npm packages) were not — the scaffold pins the npm deps to the same version as the framework, producing an uninstallable package.json.

Suggested fix

  • Publish the @simplemodule/* npm packages in lockstep with the NuGet release, or
  • Have sm new project resolve the latest published npm version (mirroring how NuGetVersionResolver resolves the NuGet version) rather than assuming the framework version exists on npm.

(Compare prior scaffold/publish-sync issues #150, #151, #152.)

Environment

  • sm CLI 0.0.37, SimpleModule.* NuGet 0.0.37, @simplemodule/client npm latest 0.0.36
  • npm 10.x, Node LTS, Linux

Workaround

Pin the @simplemodule/* npm deps to 0.0.36 (the latest published) in the root and module package.json files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcli

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions