+
Skip to content

Crash when trying to add specific package versions #163

@ThisIsMissEm

Description

@ThisIsMissEm

Package version

13.3.0

Describe the bug

Sometimes it's handy to be able to add a prerelease version of a package to your project, for instance:

node ace add @thisismissem/adonisjs-respond-with@v2.0.0-next.0

Whilst this installs the package as you'll expect it to, it crashes when it attempts to configure the package.

The full log output is:

[ info ] Installing the package using the following command : npm add @thisismissem/adonisjs-respond-with@v2.0.0-next.0
❯ Continue ? (Y/n) · true
[ wait ] package installed successfully ...

   Error: Cannot find package '@thisismissem/adonisjs-respond-with@v2.0.0-next.0' imported from
   /adonis-app/bin/console.ts
 

   ⁃ packageResolve
     node_modules/ts-node-maintained/dist-raw/node-internal-modules-esm-resolve.js:969
   ⁃ moduleResolve
     node_modules/ts-node-maintained/dist-raw/node-internal-modules-esm-resolve.js:1010
   ⁃ Object.defaultResolve
     node_modules/ts-node-maintained/dist-raw/node-internal-modules-esm-resolve.js:1125

[ error ] Unable to configure @thisismissem/adonisjs-respond-with@v2.0.0-next.0

There's no --version flag for node ace add so it seems like the only way to add a prerelease is to do:

node ace add @thisismissem/adonisjs-respond-with@v2.0.0-next.0
// expect crash
node ace configure @thisismissem/adonisjs-respond-with

Maybe there's a package from npm or something that helps parse package/version combinations?

Reproduction repo

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载