How to use my local Nestjs-query repo ? #202
-
I'm having trouble setting up a repo. I wanted to ask, what do usually do to set up a project that uses your local nestjs-query? On my side
{
"dependencies": {
"@ptc-org/nestjs-query-core": "file:../nestjs-query/dist/packages/core",
"@ptc-org/nestjs-query-graphql": "file:../nestjs-query/dist/packages/query-graphql",
"@ptc-org/nestjs-query-typeorm": "file:../nestjs-query/dist/packages/query-typeorm",
}
} But when I run Error: Cannot find module '/Users/valentin/Perso/Projects/nestjs-query/node_modules/@ptc-org/nestjs-query-core/src/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:438:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:680:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Function.Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/Users/valentin/Perso/Projects/nestjs-query/packages/query-graphql/src/decorators/authorizer.decorator.ts:1:1)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32) And if I'm not wrong, the examples are used for tests. So I cannot run them as it is as they don't have a Anyway, I was just wondering how you did your setup to work on it |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When I want to test something in my local project: # Build package and copy dist over to my project, restart server tehre
nx build query-core && cp -R ./dist/packages/query-core/src/ <.. location of other project>/node_modules/@ptc-org/nestjs-query-core/src When I want to fix a bug I tend to add the bug into the examples and than isolate that test (only run tests matching that file/test name) with command |
Beta Was this translation helpful? Give feedback.
When I want to test something in my local project:
When I want to fix a bug I tend to add the bug into the examples and than isolate that test (only run tests matching that file/test name) with command
nx test examples --watch