Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bookshop Browser v3.10.0 is broken for Astro projects #196

Open
adon-cloudcannon opened this issue Aug 14, 2024 · 0 comments
Open

Bookshop Browser v3.10.0 is broken for Astro projects #196

adon-cloudcannon opened this issue Aug 14, 2024 · 0 comments

Comments

@adon-cloudcannon
Copy link

It appears that the Bookshop Browser won't run in an Astro project in v3.10.0 (perhaps other SSGs, untested).

Steps to recreate

  1. Create a new Astro project with default setup
  2. Add Bookshop v3.10.0 as per these docs
  3. Add the sample component
  4. Try to run Bookshop Browser with npx @bookshop/browser

Following error message:

📚 Looking for Bookshop component libraries...
📚 —— Loading Bookshop from ./src
 > src/components/sample/sample.bookshop.yml:4:12: error: Expected ";" but found "Component"
    4 │   label: My Component
      ╵             ~~~~~~~~~

/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:1493
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
src/components/sample/sample.bookshop.yml:4:12: error: Expected ";" but found "Component"
    at failureErrorWithLog (/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:1493:15)
    at /Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:1151:28
    at runOnEndCallbacks (/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:941:63)
    at buildResponseToResult (/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:1149:7)
    at /Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:1258:14
    at /Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:629:9
    at handleIncomingPacket (/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:726:9)
    at Socket.readFromStdout (/Users/adonmoskal/astro-bookshop/node_modules/@bookshop/builder/node_modules/esbuild/lib/main.js:596:7)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12) {
  errors: [
    {
      detail: undefined,
      location: {
        column: 12,
        file: 'src/components/sample/sample.bookshop.yml',
        length: 9,
        line: 4,
        lineText: '  label: My Component',
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'Expected ";" but found "Component"'
    }
  ],
  warnings: []
}

Node.js v20.12.2

Reverting Bookshop back to v3.9.0 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant