Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Unable to build on Cloudflare pages. #23

Closed
sokryptk opened this issue Jun 16, 2022 · 1 comment
Closed

Unable to build on Cloudflare pages. #23

sokryptk opened this issue Jun 16, 2022 · 1 comment

Comments

@sokryptk
Copy link

sokryptk commented Jun 16, 2022

Hi!, I am able to build and host my project with the plugin properly on my local machine, but somehow I get this on the CI provided by CF Pages.

$ vite build
--
18:56:47.330 | failed to load config from /opt/buildhome/repo/vite.config.ts
18:56:47.330 | error during build:
18:56:47.330 | /opt/buildhome/repo/node_modules/vite-plugin-glob/dist/index.cjs:26
18:56:47.330 | server?.watcher.add(allGlobs.flatMap((i) => i.filter((i2) => i2[0] !== "!")));
18:56:47.331 |           ^
18:56:47.331 |  
18:56:47.331 | SyntaxError: Unexpected token '.'
18:56:47.331 | at wrapSafe (internal/modules/cjs/loader.js:1054:16)
18:56:47.331 | at Module._compile (internal/modules/cjs/loader.js:1102:27)
18:56:47.331 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
18:56:47.331 | at Module.load (internal/modules/cjs/loader.js:986:32)
18:56:47.331 | at Function.Module._load (internal/modules/cjs/loader.js:879:14)
18:56:47.331 | at Module.require (internal/modules/cjs/loader.js:1026:19)
18:56:47.332 | at require (internal/modules/cjs/helpers.js:72:18)
18:56:47.332 | at Object.<anonymous> (/opt/buildhome/repo/vite.config.ts:33:39)
18:56:47.332 | at Module._compile (internal/modules/cjs/loader.js:1138:30)
18:56:47.332 | at Object.require.extensions.<computed> [as .ts] (/opt/buildhome/repo/node_modules/vite/dist/node/chunks/dep-8f5c9290.js:61963:20)
18:56:47.354 | error Command failed with exit code 1.
18:56:47.354 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
18:56:47.371 | Failed: build command exited with code: 1

Thanks!

@antfu
Copy link
Owner

antfu commented Jun 16, 2022

You might need to set a higher version of Node in your CI.

@antfu antfu closed this as completed Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants