Bookshop Browser v3.10.0 is broken for Astro projects
Opened this issue ยท 0 comments
adon-cloudcannon commented
It appears that the Bookshop Browser won't run in an Astro project in v3.10.0
(perhaps other SSGs, untested).
Steps to recreate
- Create a new Astro project with default setup
- Add Bookshop
v3.10.0
as per these docs - Add the sample component
- 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.