nx icon indicating copy to clipboard operation
nx copied to clipboard

After migrating nx from20.0.8 to 20.0.9 getting error as "An error occurred while processing files for the @nx/nuxt/plugin plugin"

Open Madhusudan-Mishra opened this issue 5 months ago • 0 comments

Current Behavior

During the build, the project's Nuxt plugin is unable to detect the nuxt.config.ts file, resulting in the following error.

Expected Behavior

Building and serving the NX workspace should work as it was on 20.0.8

GitHub Repo

No response

Steps to Reproduce

  1. nx migrate 20.0.9
  2. pnpm install --no-frozen-lockfile
  3. nx run dashboard:serve --verbose

Nx Report

Node : 22.12.0 OS : win32-x64 Native Target : x86_64-windows pnpm : 9.15.9

nx (global) : 20.0.9 nx : 20.0.9 @nx/js : 20.0.9 @nx/eslint : 20.0.9 @nx/workspace : 20.0.9 @nx/devkit : 20.0.9 @nx/eslint-plugin : 20.0.9 @nx/nuxt : 20.0.9 @nx/vite : 20.0.9 @nx/web : 20.0.9 typescript : 5.6.3

Registered Plugins: @nx/eslint/plugin @nx/vite/plugin @nx/nuxt/plugin

⚠️ Unable to construct project graph. Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. An error occurred while processing files for the @nx/nuxt/plugin plugin. - layers/base/nuxt.config.ts: Cannot find module 'layers/base/nuxt.config.ts' Require stack:

  • D:\Nuxt\c1-2024\layers\base\nuxt.config.ts Error: Cannot find module 'layers/base/nuxt.config.ts' Require stack:
    • D:\Nuxt\c1-2024\layers\base\nuxt.config.ts at Function.resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function.resolve (node:internal/modules/helpers:148:19) at jitiResolve (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:187220) at jitiRequire (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:189288) at Function.import (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:199778) at resolveConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:346:43) at extendConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:257:27) at loadConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:189:11) at async Module.loadNuxtConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2592:18) at async getInfoFromNuxtConfig (D:\Nuxt\c1-2024\node_modules.pnpm@[email protected]@[email protected]_@[email protected]_@[email protected]_@swc+co_fvlnsufvmcuusieem2wn3jcat4\node_modules@nx\nuxt\src\plugins\plugin.js:124:18)
    • apps/dashboard/nuxt.config.ts: Cannot find module 'apps/dashboard/nuxt.config.ts' Require stack:
  • D:\Nuxt\c1-2024\apps\dashboard\nuxt.config.ts Error: Cannot find module 'apps/dashboard/nuxt.config.ts' Require stack:
    • D:\Nuxt\c1-2024\apps\dashboard\nuxt.config.ts at Function.resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function.resolve (node:internal/modules/helpers:148:19) at jitiResolve (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:187220) at jitiRequire (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:189288) at Function.import (D:\Nuxt\c1-2024\node_modules.pnpm\[email protected]\node_modules\jiti\dist\jiti.cjs:1:199778) at resolveConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:346:43) at extendConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:257:27) at loadConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:189:11) at async Module.loadNuxtConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2592:18) at async getInfoFromNuxtConfig (D:\Nuxt\c1-2024\node_modules.pnpm@[email protected]@[email protected]_@[email protected]_@[email protected]_@swc+co_fvlnsufvmcuusieem2wn3jcat4\node_modules@nx\nuxt\src\plugins\plugin.js:124:18)

### Failure Logs

```shell
[{
	"resource": "\\Nuxt\\c1-2024\\nx.json",
	"owner": "nx",
	"severity": 8,
	"message": "An error occurred while processing files for the @nx/nuxt/plugin plugin.\n  - layers/base/nuxt.config.ts: Cannot find module 'layers/base/nuxt.config.ts'\nRequire stack:\n- D:\\Nuxt\\c1-2024\\layers\\base\\nuxt.config.ts\n    Error: Cannot find module 'layers/base/nuxt.config.ts'\n    Require stack:\n    - D:\\Nuxt\\c1-2024\\layers\\base\\nuxt.config.ts\n        at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)\n        at Function.resolve (node:internal/modules/helpers:193:19)\n        at jitiResolve (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:187220)\n        at jitiRequire (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:189288)\n        at Function.import (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:199778)\n        at resolveConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:346:43)\n        at extendConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:257:27)\n        at loadConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:189:11)\n        at async Module.loadNuxtConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2592:18)\n        at async getInfoFromNuxtConfig (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+co_fvlnsufvmcuusieem2wn3jcat4\\node_modules\\@nx\\nuxt\\src\\plugins\\plugin.js:124:18)\n  - apps/dashboard/nuxt.config.ts: Cannot find module 'apps/dashboard/nuxt.config.ts'\nRequire stack:\n- D:\\Nuxt\\c1-2024\\apps\\dashboard\\nuxt.config.ts\n    Error: Cannot find module 'apps/dashboard/nuxt.config.ts'\n    Require stack:\n    - D:\\Nuxt\\c1-2024\\apps\\dashboard\\nuxt.config.ts\n        at Module._resolveFilename (node:internal/modules/cjs/loader:1219:15)\n        at Function.resolve (node:internal/modules/helpers:193:19)\n        at jitiResolve (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:187220)\n        at jitiRequire (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:189288)\n        at Function.import (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\[email protected]\\node_modules\\jiti\\dist\\jiti.cjs:1:199778)\n        at resolveConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:346:43)\n        at extendConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:257:27)\n        at loadConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/[email protected][email protected]/node_modules/c12/dist/shared/c12.PQMoYrit.mjs:189:11)\n        at async Module.loadNuxtConfig (file:///D:/Nuxt/c1-2024/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.mjs:2592:18)\n        at async getInfoFromNuxtConfig (D:\\Nuxt\\c1-2024\\node_modules\\.pnpm\\@[email protected]_@[email protected]_@[email protected]_@[email protected]_@swc+co_fvlnsufvmcuusieem2wn3jcat4\\node_modules\\@nx\\nuxt\\src\\plugins\\plugin.js:124:18)",
	"startLineNumber": 1,
	"startColumn": 1,
	"endLineNumber": 1,
	"endColumn": 1
}]

Package Manager Version

pnpm

Operating System

  • [ ] macOS
  • [ ] Linux
  • [x] Windows
  • [ ] Other (Please specify)

Additional Information

No response

Madhusudan-Mishra avatar Jun 09 '25 05:06 Madhusudan-Mishra