Skip to content

[vercel] build fails with 'fse.writeJson is not a function' #565

Description

@hartmut-co-uk

Hi, I tried adding image-edge to my nuxt3 app, starts up fine locally but doesn't build any longer on vercel.

{
  "private": true,
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview"
  },
  "devDependencies": {
    "@nuxt/image-edge": "^1.0.0-27621400.93ce78a",
    "@nuxtjs/tailwindcss": "^5.2.0",
    "nuxt": "3.0.0-rc.4",
    "tailwind-scrollbar": "^1.3.1"
  },
  "dependencies": {}
}
    modules: [
        '@nuxtjs/tailwindcss',
        '@nuxt/image-edge',
    ],
[18:28:55.082] Retrieving list of deployment files...
[18:28:57.872] Downloading 123 deployment files...
[18:29:04.664] Looking up build cache...
[18:29:04.901] Build Cache not found
[18:29:05.128] Running "vercel build"
[18:29:05.588] Vercel CLI 27.0.1
[18:29:05.807] Installing dependencies...
[18:29:06.149] yarn install v1.22.17
[18:29:06.213] [1/4] Resolving packages...
[18:29:06.496] [2/4] Fetching packages...
[18:29:14.537] warning vscode-languageclient@7.0.0: The engine "vscode" appears to be invalid.
[18:29:14.542] [3/4] Linking dependencies...
[18:29:14.544] warning "@nuxtjs/tailwindcss > @nuxt/postcss8 > css-loader@5.2.7" has unmet peer dependency "webpack@^4.27.0 || ^5.0.0".
[18:29:14.545] warning "@nuxtjs/tailwindcss > @nuxt/postcss8 > postcss-loader@4.3.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
[18:29:19.754] [4/4] Building fresh packages...
[18:29:20.668] Done in 14.52s.
[18:29:20.885] Running "yarn run build"
[18:29:21.061] yarn run v1.22.17
[18:29:21.093] $ nuxt build
[18:29:21.167] [log] Nuxt CLI v3.0.0-rc.4
[18:29:23.629] [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/tailwind.css
[18:29:23.632] [info] [nuxt:tailwindcss] Merging Tailwind config from ~/tailwind.config.js
[18:29:23.638] [error] fse.writeJson is not a function
[18:29:23.638]   at Object.vercel [as setup] (node_modules/@nuxt/image-edge/dist/module.mjs:71:15)
[18:29:23.638]   at async setup (node_modules/@nuxt/image-edge/dist/module.mjs:172:9)
[18:29:23.638]   at async Object.normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:582:5)
[18:29:23.638]   at async installModule (node_modules/@nuxt/kit/dist/index.mjs:398:3)
[18:29:23.639]   at async initNuxt (node_modules/nuxt/dist/index.mjs:1334:7)
[18:29:23.639]   at async loadNuxt (node_modules/nuxt/dist/index.mjs:1361:5)
[18:29:23.639]   at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:662:19)
[18:29:23.639]   at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:29:18)
[18:29:23.639]   at async _main (node_modules/nuxi/dist/cli.mjs:46:20)
[18:29:23.660] error Command failed with exit code 1.
[18:29:23.660] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[18:29:23.679] Error! Command "yarn run build" exited with 1
[18:29:23.739] Error: Command "vercel build" exited with 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions