fantuci
CDCloudflare Developers
•Created by fantuci on 7/31/2023 in #pages-help
Error deploying nuxt
Hey everyone. I'm trying to deploy a nuxt app in Cloudflare Pages, but im getting the following error when running the build command:
has anyone seen a similar error? Using Node 18.16.1 and nuxt 3.6.5
[error] Cannot resolve "canvas" from "/opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/linkedom/commonjs/canvas.cjs" and externals are not allowed!
at Object.resolveId (node_modules/.pnpm/[email protected]/node_modules/nitropack/dist/shared/nitro.7a525996.mjs:1781:17)
at async PluginDriver.hookFirstAndGetPlugin (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25256:28)
at async resolveId (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:23931:26)
at async ModuleLoader.resolveId (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24345:15)
at async node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:778:16
at async Promise.all (index 0)
at async node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:770:32
at async rewriteRequireExpressionsAndGetImportBlock (node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1346:28)
at async transformCommonjs (node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1909:23)
at async transform (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24263:16)
[error] Cannot resolve "canvas" from "/opt/buildhome/repo/node_modules/.pnpm/[email protected]/node_modules/linkedom/commonjs/canvas.cjs" and externals are not allowed!
at Object.resolveId (node_modules/.pnpm/[email protected]/node_modules/nitropack/dist/shared/nitro.7a525996.mjs:1781:17)
at async PluginDriver.hookFirstAndGetPlugin (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25256:28)
at async resolveId (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:23931:26)
at async ModuleLoader.resolveId (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24345:15)
at async node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:778:16
at async Promise.all (index 0)
at async node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:770:32
at async rewriteRequireExpressionsAndGetImportBlock (node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1346:28)
at async transformCommonjs (node_modules/.pnpm/@[email protected][email protected]/node_modules/@rollup/plugin-commonjs/dist/es/index.js:1909:23)
at async transform (node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:24263:16)
2 replies