You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building the app locally works fine, but building in Vercel fails with the following logs/error:
[01:02:29.465] ⨯ Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
[01:02:29.471]
[01:02:29.472] > Build error occurred
[01:02:29.473] file:///vercel/path0/node_modules/glob/dist/esm/pattern.js:2
[01:02:29.473] import { GLOBSTAR } from 'minimatch';
[01:02:29.473] ^^^^^^^^
[01:02:29.473] SyntaxError: Named export 'GLOBSTAR' not found. The requested module 'minimatch' is a CommonJS module, which may not support all module.exports as named exports.
[01:02:29.473] CommonJS modules can always be imported via the default export, for example using:
[01:02:29.473]
[01:02:29.474] import pkg from 'minimatch';
[01:02:29.474] const { GLOBSTAR } = pkg;
[01:02:29.474]
[01:02:29.474] at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
[01:02:29.474] at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
[01:02:29.474] at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
[01:02:29.474] at async loadConfig (/vercel/path0/node_modules/next/dist/server/config.js:698:36)
[01:02:29.474] at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
[01:02:29.474] at async /vercel/path0/node_modules/next/dist/build/index.js:372:28
[01:02:29.474] at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
[01:02:29.474] at async build (/vercel/path0/node_modules/next/dist/build/index.js:366:9)
[01:02:29.480] error: script "vercel-build" exited with code 1
[01:02:29.484] Error: Command "bun run vercel-build" exited with 1
Expected behavior
It should build.
Screenshots (if relevant)
No response
Additional information (if relevant)
next.config.js
import withSerwistInit from "@serwist/next";
const withSerwist = withSerwistInit({
// Note: This is only an example. If you use Pages Router,
// use something else that works, such as "service-worker/index.ts".
swSrc: "src/app/sw.ts",
swDest: "public/sw.js",
});
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
await import("./src/env.js");
/** @type {import("next").NextConfig} */
const config = {};
export default withSerwist(config);
Everything else is the default from create-t3-app.
The text was updated successfully, but these errors were encountered:
Sounds like it might be a package resolution issue with serwist + bun. Got multiple projects running serwist (of which, atleast 4 of em are started from the t3-app startingpoint) and when using any other package manager, all is fine.
Provide environment information
Next.js 14.2.3
@serwist/next: 9.0.2
Which project is this issue for?
@serwist/next
Link to reproduction - Issues with a link to complete (but minimal) reproduction code help us address them faster
Will include later
To reproduce
Follow the steps described here:
https://serwist.pages.dev/docs/next/getting-started
Deploy to Vercel
Describe the bug
Building the app locally works fine, but building in Vercel fails with the following logs/error:
Expected behavior
It should build.
Screenshots (if relevant)
No response
Additional information (if relevant)
next.config.js
Everything else is the default from create-t3-app.
The text was updated successfully, but these errors were encountered: