nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
66.9k stars 7.55k forks source link

Error: Cannot find module '@nestjs/core/guards/constants' #118

Closed KatSick closed 7 years ago

KatSick commented 7 years ago

I tried to run project that i made serveral days ago, i cleanup node_modules and yarn.lock, re-install and see error: Error: Cannot find module '@nestjs/core/guards/constants'

Error: Cannot find module '@nestjs/core/guards/constants'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/ochervak/Projects/nest-typescript-starter/node_modules/@nestjs/websockets/context/ws-context-creator.js:12:21)
    at Module._compile (module.js:570:32)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/ochervak/Projects/nest-typescript-starter/node_modules/ts-node/src/index.ts:384:14)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)

Test project: https://github.com/KatSick/nest-playground

kamilmysliwiec commented 7 years ago

Hey @KatSick, Guards feature is available in the latest version, which is in beta stage now. Let's make sure that you have installed the appropriate version of the dependencies (latest stable, so e.g. for @nestjs/core it's 3.0.1)

KatSick commented 7 years ago

Hi, as you can see in repo attached version was 3.0.1.

kamilmysliwiec commented 7 years ago

Yeah, I saw, but one of your packages must be in unstable version. I recommend to check it by your own (inside the package). The stack trace shows that @nestjs/websockets context creator is trying to import guards feature, so I assume the websockets package version is not 3.0.0 in fact.

kamilmysliwiec commented 7 years ago

The v4 is published. Close :cat:

lock[bot] commented 4 years ago

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.