Skip to content

Module resolution errors #161

@lionelhorn

Description

@lionelhorn

I have a NextJs app inside a monorepo. Pacakges are built using Nx

package.json

"dependencies": {
    "@deepkit/type": "^1.0.1-alpha.58",
    [...]
}

Yarn install log

yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @deepkit/[email protected]" has unmet peer dependency "@deepkit/core@^1.0.1-alpha.13".
warning " > @deepkit/[email protected]" has unmet peer dependency "reflect-metadata@^0.1.13".
[...]

I try to build

nx build

I get

../../node_modules/@deepkit/type/dist/esm/src/decorators.js
Module not found: Can't resolve '@deepkit/core' in '[path-omitted]\node_modules\@deepkit\type\dist\esm\src'

Looking at the yarn log, I then see that It's messing a peer dependency to
"@deepkit/core@^1.0.1-alpha.13"
"reflect-metadata": "^0.1.13"

So I added those.

Then the build error becomes

Cannot find module '[path-omitted]\node_modules\@deepkit\type\dist\esm\src\types' imported from [path-omitted]\node_modules\@deepkit\type\dist\esm\index.js

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions