snowfallorg/frost

src/pages/packages/index.astro Cannot read properties of undefined (reading 'startsWith')

pinage404 opened this issue · 0 comments

Hello,

I'm curious, i would like to know what kind of documentation it could generate

I give it a try on my dotfiles

frost build

But i got this error

warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/mf93vn6bj39sw11ykl66n1pn3j9f4nhv-frost-ui-0.0.1.drv^*'
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/iqmqi99dr1p7r0n87shnpbh950j65bgm-8a39r5vndgl4jywqx92165c6jnci8wz6-source/
source root is 8a39r5vndgl4jywqx92165c6jnci8wz6-source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Executing npmConfigHook
Configuring npm
Validating consistency between /build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/package-lock.json and /nix/store/zjdmlfdnw22if3002fb2y4p2ny9vmpn9-frost-ui-0.0.1-npm-deps/>
Installing dependencies

added 545 packages, and audited 546 packages in 2s

181 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
patching script interpreter paths in node_modules
node_modules/@astrojs/language-server/bin/nodeServer.js: interpreter directive changed from "#! /usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodej>
node_modules/@babel/parser/bin/babel-parser.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/>
node_modules/@nicolo-ribaudo/semver-v6/bin/semver.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18>
node_modules/acorn/bin/acorn: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/load-yaml-file/node_modules/js-yaml/bin/js-yaml.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3>
node_modules/autoprefixer/bin/autoprefixer: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/>
node_modules/astro/astro.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/browserslist/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/cssesc/bin/cssesc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/esbuild/bin/esbuild: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/esprima/bin/esparse.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/esprima/bin/esvalidate.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/gray-matter/node_modules/js-yaml/bin/js-yaml.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-n>
node_modules/is-docker/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/is-inside-container/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/nod>
node_modules/jiti/bin/jiti.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/js-yaml/bin/js-yaml.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/json5/lib/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/jsesc/bin/jsesc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/loose-envify/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/mime/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/nanoid/bin/nanoid.cjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/open/xdg-open: interpreter directive changed from "#!/bin/sh" to "/nix/store/8fv91097mbh5049i9rglc73dx6kjg3qk-bash-5.2-p15/bin/sh"
node_modules/prettier/bin-prettier.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/resolve/bin/resolve: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/rollup/dist/bin/rollup: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/semver/bin/semver.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/sucrase/bin/sucrase: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/sucrase/bin/sucrase-node: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/typescript/bin/tsc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/typescript/bin/tsserver: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/update-browserslist-db/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/>
node_modules/uvu/bin.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/vite/bin/vite.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/vscode-languageserver/bin/installServerIntoExtension: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1>
node_modules/which/bin/node-which: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
node_modules/is-wsl/node_modules/is-docker/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17>
node_modules/tailwindcss/lib/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/1l03gdg4w3cvkygvbxsq9i19flnp1p3y-nodejs-18.17.1/bin/node"
rebuilt dependencies successfully
patching script interpreter paths in node_modules
Finished npmConfigHook
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing npmBuildHook

> build
> astro build

12:11:50 AM [content] Types generated 212ms
12:11:50 AM [build] output target: static
12:11:50 AM [build] Collecting build info...
12:11:50 AM [build] Completed in 245ms.
12:11:50 AM [build] Building static entrypoints...
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
12:11:52 AM [build] Completed in 1.21s.

 building client 
Completed in 0.86s.


 generating static routes 
▶ src/pages/index.astro
{
  id: 'data',
  collection: 'meta',
  data: {
    snowfall: null,
    flake: {
      resolved: '/home/pinage404/Project/dotfiles',
      nixConfig: null,
      description: null
    },
    modules: { nixos: [Array], darwin: [], home: [Array] }
  }
}
  └─ /index.html (+284ms)
▶ src/pages/packages/index.astro
 error   Cannot read properties of undefined (reading 'startsWith')
  File:
    src/pages/packages/index.astro
  Stacktrace:
TypeError: Cannot read properties of undefined (reading 'startsWith')
    at file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/dist/chunks/pages/index.astro.3d045a91.mjs:695:46
    at async renderPage (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/runtime/server/render/page.js:96:30)
    at async renderPage (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/render/core.js:49:18)
    at async generatePath (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/generate.js:463:20)
    at async generatePage (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/generate.js:209:5)
    at async generatePages (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/generate.js:135:7)
    at async staticBuild (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/static-build.js:85:7)
    at async AstroBuilder.build (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/index.js:118:5)
    at async AstroBuilder.run (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/index.js:149:7)
    at async build (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/core/build/index.js:37:3)
    at async runCommand (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/cli/index.js:170:14)
    at async cli (file:///build/8a39r5vndgl4jywqx92165c6jnci8wz6-source/node_modules/astro/dist/cli/index.js:211:5)


ERROR: `npm build` failed

Here are a few things you can try, depending on the error:
1. Make sure your build script (build) exists
  If there is none, set `dontNpmBuild = true`.
2. If the error being thrown is something similar to "error:0308010C:digital envelope routines::unsupported", add `NODE_OPTIONS = "--openssl-legacy-provider"` to your d>
  See https://github.com/webpack/webpack/issues/14532 for more information.

I suppose that the problem is here https://github.com/snowfallorg/frost-ui/blob/9d3c3cb9b984e566af43207cbac5ed85b8b446f5/src/pages/packages/index.astro#L24