Alchez
Nuxt Module Builder Issue
Whenever I run the
I'm creating a Nuxt module inside a Rushstack monorepo.
nuxt-module-build build
command inside my package, I get the following error in one of the build outputs:
ℹ Building nuxt 11:39:49 AM
ℹ Cleaning dist directory: ./dist 11:39:49 AM
.nuxt/components.plugin.mjs(3,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '~/node_modules/nuxt/dist/app/nuxt.js'. This is likely not portable. A type annotation is necessary.
ERROR Failed to compile. Check the logs above. 11:39:53 AM
at error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at Object.error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25351:20)
at Object.error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24472:42)
at generateDtsFromTs (/common/temp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.mjs:1834:30)
at Object.transform (/common/temp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.mjs:1843:38)
at /common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25544:40
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ERROR Failed to compile. Check the logs above.
ℹ Building nuxt 11:39:49 AM
ℹ Cleaning dist directory: ./dist 11:39:49 AM
.nuxt/components.plugin.mjs(3,1): error TS2742: The inferred type of 'default' cannot be named without a reference to '~/node_modules/nuxt/dist/app/nuxt.js'. This is likely not portable. A type annotation is necessary.
ERROR Failed to compile. Check the logs above. 11:39:53 AM
at error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at Object.error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25351:20)
at Object.error (/common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24472:42)
at generateDtsFromTs (/common/temp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.mjs:1834:30)
at Object.transform (/common/temp/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-dts/dist/rollup-plugin-dts.mjs:1843:38)
at /common/temp/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25544:40
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ERROR Failed to compile. Check the logs above.
10 replies