Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command isn't working as expected #297

Open
2 of 4 tasks
xuzaixian opened this issue May 25, 2022 · 3 comments
Open
2 of 4 tasks

Add command isn't working as expected #297

xuzaixian opened this issue May 25, 2022 · 3 comments

Comments

@xuzaixian
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

  1. nest new add-issue
  2. cd add-issue
  3. nest add @nestjs/azure-storage
  4. Error: Collection "@nestjs/azure-storage" cannot be resolved.

After a while, when @nestjs/azure-storage is actually installed.
nest add @nestjs/azure-storage works as expected

Minimum reproduction code

nest new add-issue

Steps to reproduce

  1. nest new add-issue
  2. cd add-issue
  3. nest add @nestjs/azure-storage

Expected behavior

use library schematic after package install.

Package version

8.2.6

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

I found out that variable collect here is alwasy true
It seems that the problem is run function here will resolve immediately.

image

@kamilmysliwiec kamilmysliwiec transferred this issue from nestjs/nest-cli May 25, 2022
@micalevisk
Copy link
Member

I'm getting another error:

$ npx nest add @nestjs/azure-storage
✔ Package installation in progress... ☕
Starting library setup...
Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
    at Object.code (/tmp/add-issue/node_modules/ajv/dist/vocabularies/core/id.js:6:15)
    at keywordCode (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:454:13)
    at /tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:222:17
    at CodeGen.code (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:568:18)
    at iterateKeywords (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:219:9)
    at groupKeywords (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:208:13)
    at /tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:192:13
    at CodeGen.code (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:568:18)

@xuzaixian
Copy link
Author

I'm getting another error:

$ npx nest add @nestjs/azure-storage
✔ Package installation in progress... ☕
Starting library setup...
Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
    at Object.code (/tmp/add-issue/node_modules/ajv/dist/vocabularies/core/id.js:6:15)
    at keywordCode (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:454:13)
    at /tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:222:17
    at CodeGen.code (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:568:18)
    at iterateKeywords (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:219:9)
    at groupKeywords (/tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:208:13)
    at /tmp/add-issue/node_modules/ajv/dist/compile/validate/index.js:192:13
    at CodeGen.code (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/tmp/add-issue/node_modules/ajv/dist/compile/codegen/index.js:568:18)

I think it's an another issue

@blowsie
Copy link

blowsie commented Apr 26, 2024

Same for me on windows

λ nest add @nestjs/azure-storage
√ Package installation in progress... ☕
Starting library setup...
Error: Collection "@nestjs/azure-storage" cannot be resolved.

Failed to execute command: node @nestjs/azure-storage:nest-add --source-root="src" C:\Users\xxx\scoop\apps\nvm\current\nodejs\nodejs\node.exe C:\Users\xxx\AppData\Local\pnpm\global\5\node_modules\@nestjs\cli\bin\nest.js add @nestjs/azure-storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants