ZachJW34/nx-plus

@nx-plus/nuxt: Cannot find module error when importing from libs

snorreks opened this issue · 0 comments

Current Behavior

I get error when importing from a library when using @nx-plus/nuxt.
When i run build or serve i get "Cannot find module '@onboardr/localekey-data-access'" error.

It works on other apps, i only get the error with @nx-plus/nuxt.

I get the error when running

nx build localekey-pwa
nx build localekey-pwa --with-deps
nx serve localekey-pwa
nx serve localekey-pwa --with-deps

linting works:

nx lint localekey-pwa

Expected Behavior

Be able to build or serve a nx nuxt app.

Steps to Reproduce

tsconfig:

{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"target": "ES2018",
"module": "ESNext",
"moduleResolution": "Node",
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
"esModuleInterop": true,
"allowJs": true,
"sourceMap": true,
"strict": true,
"noEmit": true,
"experimentalDecorators": true,
"types": [
"node",
"@types/node",
"@nuxt/types",
"@nuxtjs/firebase",
"@nuxtjs/vuetify",
"nuxt-i18n",
"./@types"
],
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"references": [
{
"path": "./tsconfig.spec.json"
}
],
"include": ["/*.ts", "/.js", "**/.vue"]
}

Failure Logs

nx run localekey-pwa:build
Cannot find module '@onboardr/localekey-data-access'
Require stack:

  • C:\Development\Projects\Onboardr\apps\localekey\pwa\nuxt.config.ts

———————————————————————————————————————————————

NX ERROR Running target "localekey-pwa:build" failed

Failed tasks:

  • localekey-pwa:build

 ELIFECYCLE  Command failed with exit code 1.

Environment

Plugin name and version:
@nx-plus/nuxt: ^12.2.0

Node : 14.16.0
OS : win32 x64
pnpm : 6.25.0

nx : 12.10.1
@nrwl/angular : Not Found
@nrwl/cli : 12.10.1
@nrwl/cypress : 12.10.1
@nrwl/devkit : 12.10.1
@nrwl/eslint-plugin-nx : 12.10.1
@nrwl/express : Not Found
@nrwl/jest : 12.10.1
@nrwl/linter : 12.10.1
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 12.10.1
@nrwl/nx-cloud : 12.2.7
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 12.10.1
@nrwl/web : Not Found
@nrwl/workspace : 12.10.1
@nrwl/storybook : Not Found
@nrwl/gatsby : Not Found
typescript : 4.5.4