rothsandro / eleventy-notes

A template for Eleventy to publish your personal notes or docs.
https://eleventy-notes.sandroroth.com/
138 stars 16 forks source link

Deploying to Cloudflare Pages #8

Closed richard-herbert-fullpoint closed 1 year ago

richard-herbert-fullpoint commented 1 year ago

Loving the project!

Has anyone deployed to Cloudflare Pages?

I'm having this issue...

2023-02-18T17:05:56.592307Z Cloning repository...
2023-02-18T17:05:57.723905Z From https://github.com/xxxxxxxxxxxxxxxx
2023-02-18T17:05:57.724603Z  * branch            d2c3fbe1a432bd6de1b3044c9805a581da6f0b18 -> FETCH_HEAD
2023-02-18T17:05:57.724803Z 
2023-02-18T17:05:57.795374Z HEAD is now at d2c3fbe Updated Notes to v0.4.0 and 11ty to v2
2023-02-18T17:05:57.795966Z 
2023-02-18T17:05:57.95071Z  
2023-02-18T17:05:57.980459Z Success: Finished cloning repository files
2023-02-18T17:05:58.641333Z Installing dependencies
2023-02-18T17:05:58.654388Z Python version set to 2.7
2023-02-18T17:06:02.258282Z Downloading and installing node v14.21.3...
2023-02-18T17:06:02.718814Z Downloading https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz...
2023-02-18T17:06:03.168864Z Computing checksum with sha256sum
2023-02-18T17:06:03.298467Z Checksums matched!
2023-02-18T17:06:07.964813Z Now using node v14.21.3 (npm v6.14.18)
2023-02-18T17:06:08.378593Z Started restoring cached build plugins
2023-02-18T17:06:08.392797Z Finished restoring cached build plugins
2023-02-18T17:06:08.930423Z Attempting ruby version 2.7.1, read from environment
2023-02-18T17:06:12.951835Z Using ruby version 2.7.1
2023-02-18T17:06:13.327552Z Using PHP version 5.6
2023-02-18T17:06:13.502289Z 5.2 is already installed.
2023-02-18T17:06:13.534817Z Using Swift version 5.2
2023-02-18T17:06:13.535302Z Started restoring cached node modules
2023-02-18T17:06:13.553017Z Finished restoring cached node modules
2023-02-18T17:06:13.825213Z Installing NPM modules using NPM version 6.14.18
2023-02-18T17:06:14.841363Z npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
2023-02-18T17:06:28.915847Z 
2023-02-18T17:06:28.916287Z > @parcel/watcher@2.0.7 install /opt/buildhome/repo/node_modules/@parcel/watcher
2023-02-18T17:06:28.916466Z > node-gyp-build
2023-02-18T17:06:28.916585Z 
2023-02-18T17:06:29.137359Z 
2023-02-18T17:06:29.137831Z > msgpackr-extract@2.2.0 install /opt/buildhome/repo/node_modules/msgpackr-extract
2023-02-18T17:06:29.138091Z > node-gyp-build-optional-packages
2023-02-18T17:06:29.138328Z 
2023-02-18T17:06:29.364296Z 
2023-02-18T17:06:29.364686Z > lmdb@2.5.2 install /opt/buildhome/repo/node_modules/lmdb
2023-02-18T17:06:29.364939Z > node-gyp-build-optional-packages
2023-02-18T17:06:29.365092Z 
2023-02-18T17:06:29.64133Z  
2023-02-18T17:06:29.641713Z > core-js@3.27.2 postinstall /opt/buildhome/repo/node_modules/core-js
2023-02-18T17:06:29.643194Z > node -e "try{require('./postinstall')}catch(e){}"
2023-02-18T17:06:29.643407Z 
2023-02-18T17:06:29.750431Z Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
2023-02-18T17:06:29.750747Z 
2023-02-18T17:06:29.750902Z The project needs your help! Please consider supporting of core-js:
2023-02-18T17:06:29.751033Z > https://opencollective.com/core-js 
2023-02-18T17:06:29.751161Z > https://patreon.com/zloirock 
2023-02-18T17:06:29.751286Z > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 
2023-02-18T17:06:29.751397Z 
2023-02-18T17:06:29.751511Z Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
2023-02-18T17:06:29.751625Z 
2023-02-18T17:06:30.15371Z  npm WARN eleventy-notes@0.4.0 No description
2023-02-18T17:06:30.159799Z npm WARN eleventy-notes@0.4.0 No repository field.
2023-02-18T17:06:30.168718Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @lmdb/lmdb-linux-arm@2.5.2 (node_modules/@lmdb/lmdb-linux-arm):
2023-02-18T17:06:30.168981Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @lmdb/lmdb-linux-arm@2.5.2: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.178939Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @lmdb/lmdb-darwin-x64@2.5.2 (node_modules/@lmdb/lmdb-darwin-x64):
2023-02-18T17:06:30.179212Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @lmdb/lmdb-darwin-x64@2.5.2: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.186626Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @lmdb/lmdb-darwin-arm64@2.5.2 (node_modules/@lmdb/lmdb-darwin-arm64):
2023-02-18T17:06:30.18686Z  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @lmdb/lmdb-darwin-arm64@2.5.2: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.194429Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @lmdb/lmdb-linux-arm64@2.5.2 (node_modules/@lmdb/lmdb-linux-arm64):
2023-02-18T17:06:30.194663Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @lmdb/lmdb-linux-arm64@2.5.2: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.202957Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-darwin-x64@2.2.0 (node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64):
2023-02-18T17:06:30.203226Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-darwin-x64@2.2.0: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.211379Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-linux-arm64@2.2.0 (node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64):
2023-02-18T17:06:30.211589Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-linux-arm64@2.2.0: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.219027Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @lmdb/lmdb-win32-x64@2.5.2 (node_modules/@lmdb/lmdb-win32-x64):
2023-02-18T17:06:30.219291Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @lmdb/lmdb-win32-x64@2.5.2: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.226636Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-linux-arm@2.2.0 (node_modules/@msgpackr-extract/msgpackr-extract-linux-arm):
2023-02-18T17:06:30.226886Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-linux-arm@2.2.0: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.234169Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-win32-x64@2.2.0 (node_modules/@msgpackr-extract/msgpackr-extract-win32-x64):
2023-02-18T17:06:30.234386Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-win32-x64@2.2.0: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.24171Z  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @msgpackr-extract/msgpackr-extract-darwin-arm64@2.2.0 (node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64):
2023-02-18T17:06:30.241906Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @msgpackr-extract/msgpackr-extract-darwin-arm64@2.2.0: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.250578Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-win32-x64-msvc@1.17.1 (node_modules/lightningcss-win32-x64-msvc):
2023-02-18T17:06:30.250786Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-win32-x64-msvc@1.17.1: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.258669Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-linux-arm64-musl@1.17.1 (node_modules/lightningcss-linux-arm64-musl):
2023-02-18T17:06:30.258862Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-linux-arm64-musl@1.17.1: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.266387Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-darwin-x64@1.17.1 (node_modules/lightningcss-darwin-x64):
2023-02-18T17:06:30.266591Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-darwin-x64@1.17.1: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.274101Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-linux-arm-gnueabihf@1.17.1 (node_modules/lightningcss-linux-arm-gnueabihf):
2023-02-18T17:06:30.274342Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-linux-arm-gnueabihf@1.17.1: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.282024Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-darwin-arm64@1.17.1 (node_modules/lightningcss-darwin-arm64):
2023-02-18T17:06:30.28225Z  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-darwin-arm64@1.17.1: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.290732Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: lightningcss-linux-arm64-gnu@1.17.1 (node_modules/lightningcss-linux-arm64-gnu):
2023-02-18T17:06:30.29094Z  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for lightningcss-linux-arm64-gnu@1.17.1: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.301289Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
2023-02-18T17:06:30.301513Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2023-02-18T17:06:30.301952Z 
2023-02-18T17:06:30.304363Z added 537 packages from 410 contributors and audited 555 packages in 15.505s
2023-02-18T17:06:30.475598Z 
2023-02-18T17:06:30.475983Z 147 packages are looking for funding
2023-02-18T17:06:30.476183Z   run `npm fund` for details
2023-02-18T17:06:30.476359Z 
2023-02-18T17:06:30.476519Z found 0 vulnerabilities
2023-02-18T17:06:30.476652Z 
2023-02-18T17:06:30.497575Z NPM modules installed
2023-02-18T17:06:30.902003Z Installing Hugo 0.54.0
2023-02-18T17:06:31.593571Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-02-18T17:06:31.59768Z  Started restoring cached go cache
2023-02-18T17:06:31.618233Z Finished restoring cached go cache
2023-02-18T17:06:31.769656Z go version go1.14.4 linux/amd64
2023-02-18T17:06:31.784374Z go version go1.14.4 linux/amd64
2023-02-18T17:06:31.787622Z Installing missing commands
2023-02-18T17:06:31.787875Z Verify run directory
2023-02-18T17:06:31.78804Z  Executing user command: npm run build
2023-02-18T17:06:32.150705Z 
2023-02-18T17:06:32.151063Z > eleventy-notes@0.4.0 build /opt/buildhome/repo
2023-02-18T17:06:32.151279Z > cross-env ELEVENTY_ENV=production npm-run-all clean 11ty:build
2023-02-18T17:06:32.151437Z 
2023-02-18T17:06:32.799951Z 
2023-02-18T17:06:32.80038Z  > eleventy-notes@0.4.0 clean /opt/buildhome/repo
2023-02-18T17:06:32.800597Z > rimraf dist
2023-02-18T17:06:32.800797Z 
2023-02-18T17:06:33.23556Z  
2023-02-18T17:06:33.235888Z > eleventy-notes@0.4.0 11ty:build /opt/buildhome/repo
2023-02-18T17:06:33.236042Z > npm run clean && eleventy
2023-02-18T17:06:33.236193Z 
2023-02-18T17:06:33.558093Z 
2023-02-18T17:06:33.558466Z > eleventy-notes@0.4.0 clean /opt/buildhome/repo
2023-02-18T17:06:33.558635Z > rimraf dist
2023-02-18T17:06:33.558788Z 
2023-02-18T17:06:34.40508Z  [11ty] Eleventy CLI Fatal Error: (more in DEBUG output)
2023-02-18T17:06:34.406477Z [11ty] 1. Error in your Eleventy config file '.eleventy.js'. (via EleventyConfigError)
2023-02-18T17:06:34.406774Z [11ty] 2. Unexpected token '??=' (via SyntaxError)
2023-02-18T17:06:34.406926Z [11ty] 
2023-02-18T17:06:34.407072Z [11ty] Original error stack trace: /opt/buildhome/repo/_config/collections/groupedNotes.collection.js:11
2023-02-18T17:06:34.407215Z [11ty]     groups[folder] ??= [];
2023-02-18T17:06:34.407348Z [11ty]                    ^^^
2023-02-18T17:06:34.407488Z [11ty] 
2023-02-18T17:06:34.407607Z [11ty] SyntaxError: Unexpected token '??='
2023-02-18T17:06:34.407716Z [11ty]     at wrapSafe (internal/modules/cjs/loader.js:1029:16)
2023-02-18T17:06:34.407823Z [11ty]     at Module._compile (internal/modules/cjs/loader.js:1078:27)
2023-02-18T17:06:34.407927Z [11ty]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
2023-02-18T17:06:34.408052Z [11ty]     at Module.load (internal/modules/cjs/loader.js:979:32)
2023-02-18T17:06:34.408193Z [11ty]     at Function.Module._load (internal/modules/cjs/loader.js:819:12)
2023-02-18T17:06:34.408303Z [11ty]     at Module.require (internal/modules/cjs/loader.js:1003:19)
2023-02-18T17:06:34.408418Z [11ty]     at require (internal/modules/cjs/helpers.js:107:18)
2023-02-18T17:06:34.408527Z [11ty]     at /opt/buildhome/repo/_config/utils/loader.util.js:48:20
2023-02-18T17:06:34.408646Z [11ty]     at Array.forEach (<anonymous>)
2023-02-18T17:06:34.408756Z [11ty]     at load (/opt/buildhome/repo/_config/utils/loader.util.js:43:16)
2023-02-18T17:06:34.421074Z npm ERR! code ELIFECYCLE
2023-02-18T17:06:34.421463Z npm ERR! errno 1
2023-02-18T17:06:34.424842Z npm ERR! eleventy-notes@0.4.0 11ty:build: `npm run clean && eleventy`
2023-02-18T17:06:34.425074Z npm ERR! Exit status 1
2023-02-18T17:06:34.425403Z npm ERR! 
2023-02-18T17:06:34.425693Z npm ERR! Failed at the eleventy-notes@0.4.0 11ty:build script.
2023-02-18T17:06:34.42585Z  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-02-18T17:06:34.459149Z 
2023-02-18T17:06:34.459431Z npm ERR! A complete log of this run can be found in:
2023-02-18T17:06:34.459582Z npm ERR!     /opt/buildhome/.npm/_logs/2023-02-18T17_06_34_425Z-debug.log
2023-02-18T17:06:34.466557Z ERROR: "11ty:build" exited with 1.
2023-02-18T17:06:34.481459Z npm ERR! code ELIFECYCLE
2023-02-18T17:06:34.481822Z npm ERR! errno 1
2023-02-18T17:06:34.485264Z npm ERR! eleventy-notes@0.4.0 build: `cross-env ELEVENTY_ENV=production npm-run-all clean 11ty:build`
2023-02-18T17:06:34.485496Z npm ERR! Exit status 1
2023-02-18T17:06:34.485832Z npm ERR! 
2023-02-18T17:06:34.486108Z npm ERR! Failed at the eleventy-notes@0.4.0 build script.
2023-02-18T17:06:34.48638Z  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-02-18T17:06:34.493815Z 
2023-02-18T17:06:34.494021Z npm ERR! A complete log of this run can be found in:
2023-02-18T17:06:34.494176Z npm ERR!     /opt/buildhome/.npm/_logs/2023-02-18T17_06_34_486Z-debug.log
2023-02-18T17:06:34.503592Z Failed: build command exited with code: 1
2023-02-18T17:06:36.532582Z Failed: an internal error occurred
rothsandro commented 1 year ago

Now using node v14.21.3 (npm v6.14.18)

Eleventy Notes requires Node 16 or higher. Can you try it again with Node 16? I've never used Cloudflare Pages but its hould be possible via NODE_VERSION environment variable: https://developers.cloudflare.com/pages/platform/build-configuration/#language-support-and-tools

richard-herbert-fullpoint commented 1 year ago

Thank for the prompt response.

I must have missed that, sorry. I did see a warning originally saying that 11ty needed v14 or above so I did have my NODE_VERSION set to 14. I've now set it to 16 and have a different error.

2023-02-18T17:44:01.903055Z Cloning repository...
2023-02-18T17:44:03.118501Z From https://github.com/xxxxxxxxxxxxx
2023-02-18T17:44:03.119116Z  * branch            d2c3fbe1a432bd6de1b3044c9805a581da6f0b18 -> FETCH_HEAD
2023-02-18T17:44:03.119317Z 
2023-02-18T17:44:03.18855Z  HEAD is now at d2c3fbe Updated Notes to v0.4.0 and 11ty to v2
2023-02-18T17:44:03.189151Z 
2023-02-18T17:44:03.329275Z 
2023-02-18T17:44:03.357498Z Success: Finished cloning repository files
2023-02-18T17:44:04.067532Z Installing dependencies
2023-02-18T17:44:04.077965Z Python version set to 2.7
2023-02-18T17:44:07.452505Z Downloading and installing node v16.19.1...
2023-02-18T17:44:07.880981Z Downloading https://nodejs.org/dist/v16.19.1/node-v16.19.1-linux-x64.tar.xz...
2023-02-18T17:44:08.296777Z Computing checksum with sha256sum
2023-02-18T17:44:08.428142Z Checksums matched!
2023-02-18T17:44:12.783886Z Now using node v16.19.1 (npm v8.19.3)
2023-02-18T17:44:13.192535Z Started restoring cached build plugins
2023-02-18T17:44:13.205414Z Finished restoring cached build plugins
2023-02-18T17:44:13.704435Z Attempting ruby version 2.7.1, read from environment
2023-02-18T17:44:17.208325Z Using ruby version 2.7.1
2023-02-18T17:44:17.560977Z Using PHP version 5.6
2023-02-18T17:44:17.717033Z 5.2 is already installed.
2023-02-18T17:44:17.74657Z  Using Swift version 5.2
2023-02-18T17:44:17.747638Z Started restoring cached node modules
2023-02-18T17:44:17.762653Z Finished restoring cached node modules
2023-02-18T17:44:18.264047Z Installing NPM modules using NPM version 8.19.3
2023-02-18T17:44:18.671485Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:18.671805Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:18.671968Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:19.069015Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:19.069459Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:19.070164Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:21.778326Z npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
2023-02-18T17:44:21.827137Z npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
2023-02-18T17:44:28.984244Z 
2023-02-18T17:44:28.98456Z  added 540 packages, and audited 541 packages in 10s
2023-02-18T17:44:28.984719Z 
2023-02-18T17:44:28.984863Z 141 packages are looking for funding
2023-02-18T17:44:28.984984Z   run `npm fund` for details
2023-02-18T17:44:28.986438Z 
2023-02-18T17:44:28.986792Z found 0 vulnerabilities
2023-02-18T17:44:29.00244Z  NPM modules installed
2023-02-18T17:44:29.563756Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:29.564071Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:29.564274Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:29.581906Z Installing Hugo 0.54.0
2023-02-18T17:44:30.440241Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2023-02-18T17:44:30.444204Z Started restoring cached go cache
2023-02-18T17:44:30.463608Z Finished restoring cached go cache
2023-02-18T17:44:30.609951Z go version go1.14.4 linux/amd64
2023-02-18T17:44:30.62408Z  go version go1.14.4 linux/amd64
2023-02-18T17:44:30.626882Z Installing missing commands
2023-02-18T17:44:30.627126Z Verify run directory
2023-02-18T17:44:30.627293Z Executing user command: npm run build
2023-02-18T17:44:31.103261Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:31.103566Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:31.103765Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:31.120476Z 
2023-02-18T17:44:31.120713Z > eleventy-notes@0.4.0 build
2023-02-18T17:44:31.120848Z > cross-env ELEVENTY_ENV=production npm-run-all clean 11ty:build
2023-02-18T17:44:31.120974Z 
2023-02-18T17:44:31.814269Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:31.814577Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:31.814719Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:31.829386Z 
2023-02-18T17:44:31.829628Z > eleventy-notes@0.4.0 clean
2023-02-18T17:44:31.830227Z > rimraf dist
2023-02-18T17:44:31.830356Z 
2023-02-18T17:44:32.322217Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:32.322549Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:32.32271Z  npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:32.337638Z 
2023-02-18T17:44:32.337875Z > eleventy-notes@0.4.0 11ty:build
2023-02-18T17:44:32.338012Z > npm run clean && eleventy
2023-02-18T17:44:32.338126Z 
2023-02-18T17:44:32.747397Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2023-02-18T17:44:32.747814Z npm WARN config location in the cache, and they are managed by
2023-02-18T17:44:32.748005Z npm WARN config     [`cacache`](http://npm.im/cacache).
2023-02-18T17:44:32.762971Z 
2023-02-18T17:44:32.76323Z  > eleventy-notes@0.4.0 clean
2023-02-18T17:44:32.763385Z > rimraf dist
2023-02-18T17:44:32.763507Z 
2023-02-18T17:44:39.815288Z ✨ CSS: Built 1 bundles in 1822ms!
2023-02-18T17:44:40.990135Z ✨ JS: Built 3 bundles in 2666ms!
2023-02-18T17:44:44.516029Z [11ty] Problem writing Eleventy templates: (more in DEBUG output)
2023-02-18T17:44:44.51631Z  [11ty] TemplateLayoutPathResolver directory does not exist for layouts/base.njk: ../.app/_includes (via Error)
2023-02-18T17:44:44.516455Z [11ty] 
2023-02-18T17:44:44.516581Z [11ty] Original error stack trace: Error: TemplateLayoutPathResolver directory does not exist for layouts/base.njk: ../.app/_includes
2023-02-18T17:44:44.516697Z [11ty]     at TemplateLayoutPathResolver.findFileName (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:101:13)
2023-02-18T17:44:44.516832Z [11ty]     at TemplateLayoutPathResolver.init (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:70:28)
2023-02-18T17:44:44.51695Z  [11ty]     at new TemplateLayoutPathResolver (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:21:10)
2023-02-18T17:44:44.51706Z  [11ty]     at new TemplateLayout (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateLayout.js:17:20)
2023-02-18T17:44:44.517167Z [11ty]     at Function.getTemplate (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateLayout.js:56:20)
2023-02-18T17:44:44.517299Z [11ty]     at Template.getLayout (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/Template.js:147:27)
2023-02-18T17:44:44.517419Z [11ty]     at Template.getData (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/Template.js:376:25)
2023-02-18T17:44:44.51754Z  [11ty]     at async TemplateMap.add (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateMap.js:65:16)
2023-02-18T17:44:44.517649Z [11ty]     at async Promise.all (index 69)
2023-02-18T17:44:44.517754Z [11ty]     at async TemplateWriter._createTemplateMap (/opt/buildhome/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js:325:5)
2023-02-18T17:44:44.519393Z [11ty] Wrote 0 files in 7.85 seconds (v2.0.0)
2023-02-18T17:44:45.128477Z ERROR: "11ty:build" exited with 1.
2023-02-18T17:44:45.148166Z Failed: build command exited with code: 1
2023-02-18T17:44:46.144144Z Failed: an internal error occurred
rothsandro commented 1 year ago

I can reproduce the error. It looks like Cloudflare does some kind of Git sparse-checkout (or limiting the directory access in another way) when configuring the root directory, which makes all notes and the layout path ../.app/_includes inaccessible to Eleventy.

For now you can fix the build using the following settings:

Property Value
Build command npm install --prefix .app && npm run build --prefix .app
Build output directory .app/dist/
Root Directory / (default)

I will keep this issue open and investigate the problem further to see if there is a better solution (and probably add the build settings to the documentation).

richard-herbert-fullpoint commented 1 year ago

Yep, you've cracked it!

Thank you for sticking with the issue and finding a solution.

I do usually use Netlify, it's just for this project I'm having to use Cloudflare Pages.

I'm sure a documentation note should cover it. I'd be happy to raise a PR if that would help?

rothsandro commented 1 year ago

Looks like the commands mentioned above are the way to go, I couldn't find a better solution. I will add them to the docs but have to fix the "Edit this note" link first, which doesn't work on Cloudflare.