Nest: Cannot find module '@nestjs/core/errors/exceptions/microservices-package-not-found.exception' from 'testing-module.js'

Created on 18 Oct 2018  路  8Comments  路  Source: nestjs/nest

I'm submitting a...


[?] Regression 
[X] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I created a blank new project using the Nest CLI. The test command does not seem to work, it gives following error:

Cannot find module '@nestjs/core/errors/exceptions/microservices-package-not-found.exception' from 'testing-module.js'
at Resolver.resolveModule (../node_modules/jest-resolve/build/index.js:221:17)
at Object. (../node_modules/@nestjs/testing/testing-module.js:7:53)

Installed versions:
=> Found "@nestjs/[email protected]"
=> Found "@nestjs/[email protected]"

Expected behavior

The test command should work on a newly created project, packages should have correct references to existing files.

Minimal reproduction of the problem with instructions

  1. Installed the CLI using npm i -g @nest/cli
  2. Create a new project ie. nest new project
  3. Run yarn test

What is the motivation / use case for changing the behavior?

N/A

Environment


Nest version: 5.3.14

For Tooling issues:
- Node version: v8.11.2
- Platform: Mac

Others:

Most helpful comment

@benjamin-halter make sure you update the 'nestjs/testing' package to 5.4.0 too.

All 8 comments

I downgraded the packages to ~5.2, which seems to work for now

Also experiencing the same issue.

Same here, the suggested workaround (i.e. downgrade) works.

Fixed in the latest patch release (5.3.15). Thanks for reporting!

I am still getting this error running version 5.4.0 - downgrading to 5.3.15 didn't correct the issue for me.

@benjamin-halter make sure you update the 'nestjs/testing' package to 5.4.0 too.

Awesome that was the catch.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

menme95 picture menme95  路  3Comments

marshall007 picture marshall007  路  3Comments

FranciZ picture FranciZ  路  3Comments

thohoh picture thohoh  路  3Comments

rafal-rudnicki picture rafal-rudnicki  路  3Comments