Errors on Building Application on Pages

Hello,

my first deployment from my GitHub private repo. Followed all instructions but I get errors. With Framework Preset: Eleventy, I’ve tried Build Command reccomended (eleventy) and failed. Then I’ve tried Build Command: npx @11ty/eleventy, and failed again. What am I doing wrong?

Here’s the logs with Build Command reccomended (eleventy):

2022-05-15T10:55:33.977537Z Cloning repository…
2022-05-15T10:55:34.998153Z From https://github.com/rawriddims/rawriddims.github.io
2022-05-15T10:55:34.998768Z * branch 6bd5e4a1612d7c873c8b5f2e9e2578c76d0a018f → FETCH_HEAD
2022-05-15T10:55:34.998938Z
2022-05-15T10:55:35.057729Z HEAD is now at 6bd5e4a URLs for images on Backblaze B2
2022-05-15T10:55:35.058212Z
2022-05-15T10:55:35.189547Z
2022-05-15T10:55:35.213651Z Success: Finished cloning repository files
2022-05-15T10:55:35.794840Z Installing dependencies
2022-05-15T10:55:35.806604Z Python version set to 2.7
2022-05-15T10:55:39.656192Z v12.18.0 is already installed.
2022-05-15T10:55:41.034776Z Now using node v12.18.0 (npm v6.14.4)
2022-05-15T10:55:41.369001Z Started restoring cached build plugins
2022-05-15T10:55:41.387160Z Finished restoring cached build plugins
2022-05-15T10:55:42.093482Z Attempting ruby version 2.7.1, read from environment
2022-05-15T10:55:47.917305Z Using ruby version 2.7.1
2022-05-15T10:55:48.281428Z Using PHP version 5.6
2022-05-15T10:55:48.461376Z 5.2 is already installed.
2022-05-15T10:55:48.488921Z Using Swift version 5.2
2022-05-15T10:55:48.490340Z Started restoring cached node modules
2022-05-15T10:55:48.512129Z Finished restoring cached node modules
2022-05-15T10:55:48.752188Z Installing NPM modules using NPM version 6.14.4
2022-05-15T10:55:49.704688Z npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I’ll try to do my best with it!
2022-05-15T10:56:00.056751Z
2022-05-15T10:56:00.057047Z > [email protected] install /opt/buildhome/repo/node_modules/puppeteer
2022-05-15T10:56:00.057196Z > node install.js
2022-05-15T10:56:00.057313Z
2022-05-15T10:56:02.133511Z
2022-05-15T10:56:08.390553Z Chromium downloaded to /opt/buildhome/repo/node_modules/puppeteer/.local-chromium/linux-722234
2022-05-15T10:56:08.475915Z
2022-05-15T10:56:08.476200Z > [email protected] postinstall /opt/buildhome/repo/node_modules/ejs
2022-05-15T10:56:08.476379Z > node ./postinstall.js
2022-05-15T10:56:08.476508Z
2022-05-15T10:56:08.560283Z Thank you for installing e[35mEJSe[0m: built with the e[32mJakee[0m JavaScript build tool (e[32mhttps://jakejs.com/e[0m)
2022-05-15T10:56:08.561216Z
2022-05-15T10:56:09.004524Z npm WARN [email protected] No description
2022-05-15T10:56:09.004829Z npm WARN [email protected] No repository field.
2022-05-15T10:56:09.004983Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
2022-05-15T10:56:09.005119Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {os:darwin,arch:any} (current: {os:linux,arch:x64})
2022-05-15T10:56:09.005659Z
2022-05-15T10:56:09.008424Z added 724 packages from 586 contributors and audited 725 packages in 19.34s
2022-05-15T10:56:09.230436Z
2022-05-15T10:56:09.230762Z 81 packages are looking for funding
2022-05-15T10:56:09.231106Z run npm fund for details
2022-05-15T10:56:09.231279Z
2022-05-15T10:56:09.231460Z found 18 vulnerabilities (7 moderate, 5 high, 6 critical)
2022-05-15T10:56:09.231636Z run npm audit fix to fix them, or npm audit for details
2022-05-15T10:56:09.268033Z NPM modules installed
2022-05-15T10:56:09.640251Z Installing Hugo 0.54.0
2022-05-15T10:56:10.312423Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2022-05-15T10:56:10.317331Z Started restoring cached go cache
2022-05-15T10:56:10.344391Z Finished restoring cached go cache
2022-05-15T10:56:10.503082Z go version go1.14.4 linux/amd64
2022-05-15T10:56:10.524154Z go version go1.14.4 linux/amd64
2022-05-15T10:56:10.528833Z Installing missing commands
2022-05-15T10:56:10.529149Z Verify run directory
2022-05-15T10:56:10.529409Z Executing user command: eleventy
2022-05-15T10:56:10.847321Z Eleventy fatal error: (more in DEBUG output)
2022-05-15T10:56:10.848522Z > Error in your Eleventy config file ‘/opt/buildhome/repo/.eleventy.js’.
2022-05-15T10:56:10.849007Z
2022-05-15T10:56:10.849190Z EleventyConfigError was thrown
2022-05-15T10:56:10.849322Z > Unexpected token ‘.’
2022-05-15T10:56:10.849465Z
2022-05-15T10:56:10.849580Z SyntaxError was thrown:
2022-05-15T10:56:10.849688Z /opt/buildhome/repo/.eleventy.js:27
2022-05-15T10:56:10.849795Z arr.forEach((item) => item.data.tags?.forEach((tag) => tagsSet.add(tag)));
2022-05-15T10:56:10.849902Z ^
2022-05-15T10:56:10.850009Z
2022-05-15T10:56:10.850114Z SyntaxError: Unexpected token ‘.’
2022-05-15T10:56:10.850219Z at wrapSafe (internal/modules/cjs/loader.js:1054:16)
2022-05-15T10:56:10.850325Z at Module._compile (internal/modules/cjs/loader.js:1102:27)
2022-05-15T10:56:10.850479Z at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
2022-05-15T10:56:10.850591Z at Module.load (internal/modules/cjs/loader.js:986:32)
2022-05-15T10:56:10.850705Z at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2022-05-15T10:56:10.850813Z at Module.require (internal/modules/cjs/loader.js:1026:19)
2022-05-15T10:56:10.850924Z at require (internal/modules/cjs/helpers.js:72:18)
2022-05-15T10:56:10.851029Z at TemplateConfig.mergeConfig (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js:87:23)
2022-05-15T10:56:10.851140Z at new TemplateConfig (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js:25:24)
2022-05-15T10:56:10.851245Z at Object. (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/Config.js:5:14)
2022-05-15T10:56:10.860641Z Failed: build command exited with code: 1
2022-05-15T10:56:11.545172Z Failed: an internal error occurred

And here’s the logs with Build Command npx @11ty/eleventy:

2022-05-15T10:52:25.56195Z Cloning repository…
2022-05-15T10:52:26.717328Z From https://github.com/rawriddims/rawriddims.github.io
2022-05-15T10:52:26.717904Z * branch 6bd5e4a1612d7c873c8b5f2e9e2578c76d0a018f → FETCH_HEAD
2022-05-15T10:52:26.718074Z
2022-05-15T10:52:26.776985Z HEAD is now at 6bd5e4a URLs for images on Backblaze B2
2022-05-15T10:52:26.777561Z
2022-05-15T10:52:26.910483Z
2022-05-15T10:52:26.933899Z Success: Finished cloning repository files
2022-05-15T10:52:27.497418Z Installing dependencies
2022-05-15T10:52:27.509446Z Python version set to 2.7
2022-05-15T10:52:32.121632Z v12.18.0 is already installed.
2022-05-15T10:52:33.540419Z Now using node v12.18.0 (npm v6.14.4)
2022-05-15T10:52:33.880634Z Started restoring cached build plugins
2022-05-15T10:52:33.897424Z Finished restoring cached build plugins
2022-05-15T10:52:34.598523Z Attempting ruby version 2.7.1, read from environment
2022-05-15T10:52:40.500291Z Using ruby version 2.7.1
2022-05-15T10:52:40.871221Z Using PHP version 5.6
2022-05-15T10:52:41.057051Z 5.2 is already installed.
2022-05-15T10:52:41.08591Z Using Swift version 5.2
2022-05-15T10:52:41.087346Z Started restoring cached node modules
2022-05-15T10:52:41.110812Z Finished restoring cached node modules
2022-05-15T10:52:41.360639Z Installing NPM modules using NPM version 6.14.4
2022-05-15T10:52:42.319756Z npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I’ll try to do my best with it!
2022-05-15T10:52:52.507923Z
2022-05-15T10:52:52.508235Z > [email protected] install /opt/buildhome/repo/node_modules/puppeteer
2022-05-15T10:52:52.508385Z > node install.js
2022-05-15T10:52:52.508514Z
2022-05-15T10:52:54.694318Z
2022-05-15T10:53:00.889662Z Chromium downloaded to /opt/buildhome/repo/node_modules/puppeteer/.local-chromium/linux-722234
2022-05-15T10:53:00.971006Z
2022-05-15T10:53:00.971319Z > [email protected] postinstall /opt/buildhome/repo/node_modules/ejs
2022-05-15T10:53:00.971477Z > node ./postinstall.js
2022-05-15T10:53:00.9716Z
2022-05-15T10:53:01.056078Z Thank you for installing e[35mEJSe[0m: built with the e[32mJakee[0m JavaScript build tool (e[32mhttps://jakejs.com/e[0m)
2022-05-15T10:53:01.056497Z
2022-05-15T10:53:01.535769Z npm WARN [email protected] No description
2022-05-15T10:53:01.536154Z npm WARN [email protected] No repository field.
2022-05-15T10:53:01.536451Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
2022-05-15T10:53:01.536692Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {os:darwin,arch:any} (current: {os:linux,arch:x64})
2022-05-15T10:53:01.536991Z
2022-05-15T10:53:01.539978Z added 724 packages from 586 contributors and audited 725 packages in 19.259s
2022-05-15T10:53:01.765954Z
2022-05-15T10:53:01.766306Z 81 packages are looking for funding
2022-05-15T10:53:01.766487Z run npm fund for details
2022-05-15T10:53:01.766632Z
2022-05-15T10:53:01.767265Z found 18 vulnerabilities (7 moderate, 5 high, 6 critical)
2022-05-15T10:53:01.767493Z run npm audit fix to fix them, or npm audit for details
2022-05-15T10:53:01.801321Z NPM modules installed
2022-05-15T10:53:02.179937Z Installing Hugo 0.54.0
2022-05-15T10:53:02.86658Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2022-05-15T10:53:02.871109Z Started restoring cached go cache
2022-05-15T10:53:02.894916Z Finished restoring cached go cache
2022-05-15T10:53:03.057938Z go version go1.14.4 linux/amd64
2022-05-15T10:53:03.079075Z go version go1.14.4 linux/amd64
2022-05-15T10:53:03.083534Z Installing missing commands
2022-05-15T10:53:03.08384Z Verify run directory
2022-05-15T10:53:03.083987Z Executing user command: npx @11ty/eleventy
2022-05-15T10:53:03.429962Z Eleventy fatal error: (more in DEBUG output)
2022-05-15T10:53:03.430622Z > Error in your Eleventy config file ‘/opt/buildhome/repo/.eleventy.js’.
2022-05-15T10:53:03.430881Z
2022-05-15T10:53:03.431071Z EleventyConfigError was thrown
2022-05-15T10:53:03.431229Z > Unexpected token ‘.’
2022-05-15T10:53:03.431372Z
2022-05-15T10:53:03.431502Z SyntaxError was thrown:
2022-05-15T10:53:03.431632Z /opt/buildhome/repo/.eleventy.js:27
2022-05-15T10:53:03.431788Z arr.forEach((item) => item.data.tags?.forEach((tag) => tagsSet.add(tag)));
2022-05-15T10:53:03.431941Z ^
2022-05-15T10:53:03.432098Z
2022-05-15T10:53:03.432229Z SyntaxError: Unexpected token ‘.’
2022-05-15T10:53:03.432392Z at wrapSafe (internal/modules/cjs/loader.js:1054:16)
2022-05-15T10:53:03.432523Z at Module._compile (internal/modules/cjs/loader.js:1102:27)
2022-05-15T10:53:03.432653Z at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
2022-05-15T10:53:03.432799Z at Module.load (internal/modules/cjs/loader.js:986:32)
2022-05-15T10:53:03.432953Z at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2022-05-15T10:53:03.433099Z at Module.require (internal/modules/cjs/loader.js:1026:19)
2022-05-15T10:53:03.433228Z at require (internal/modules/cjs/helpers.js:72:18)
2022-05-15T10:53:03.433378Z at TemplateConfig.mergeConfig (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js:87:23)
2022-05-15T10:53:03.433516Z at new TemplateConfig (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js:25:24)
2022-05-15T10:53:03.433771Z at Object. (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/Config.js:5:14)
2022-05-15T10:53:03.442746Z Failed: build command exited with code: 1
2022-05-15T10:53:04.172355Z Failed: an internal error occurred

Upgrade your Node version with the NODE_VERSION environment variable. I’d suggest setting it to 16

But how can I do that, please?

Success! Here’s how to upgrade Node version: https://developers.cloudflare.com/pages/framework-guides/deploy-a-hexo-site/#using-a-specific-nodejs-version

Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.