Comments (7)
Hi @Wulfheart you need to access the storybook URL outputted by the blast:launch command
, not the /storybook_preview
path on your Laravel application.
from blast.
@ifox Thanks for your fast response. I have the following output. Where is the URL?
php artisan blast:launch
0/2 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] Reusing npm dependencies...
1/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░] Generating Stories...Error [ERR_REQUIRE_ESM]: require() of ES Module /home/aw/Code/priv/dip/brutal-forum/tailwind.config.js from /home/aw/Code/priv/dip/brutal-forum/vendor/area17/blast/src/resolveTailwindConfig.js not supported.
Instead change the require of tailwind.config.js in /home/aw/Code/priv/dip/brutal-forum/vendor/area17/blast/src/resolveTailwindConfig.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/aw/Code/priv/dip/brutal-forum/vendor/area17/blast/src/resolveTailwindConfig.js:6:18) {
code: 'ERR_REQUIRE_ESM'
}
2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] Setup Complete. Booting Storybook and watching stories.
> @area17/[email protected] storybook
> concurrently --i -c "red,blue,yellow" -n storybook,watch-components,watch-data "storybook dev --quiet -s $STORYBOOK_STATIC_PATH -p $STORYBOOK_PORT" "npm run watch-components" "npm run watch-data"
[watch-components]
[watch-components] > @area17/[email protected] watch-components
[watch-components] > chokidar "$COMPONENTPATH/**/*.blade.php" -d 0 -c "cd $PROJECTPATH && php artisan blast:generate-stories --watchEvent={event} -- '{path}';"
[watch-components]
[watch-data]
[watch-data] > @area17/[email protected] watch-data
[watch-data] > chokidar "$COMPONENTPATH/data/**/*.php" "$COMPONENTPATH/**/*.md" -d 0 -c "cd $PROJECTPATH && php artisan blast:generate-stories;"
[watch-data]
[watch-components] Watching "/home/aw/Code/priv/dip/brutal-forum/resources/views/stories/**/*.blade.php" ..
[watch-data] Watching "/home/aw/Code/priv/dip/brutal-forum/resources/views/stories/data/**/*.php", "/home/aw/Code/priv/dip/brutal-forum/resources/views/stories/**/*.md" ..
[storybook] @storybook/cli v7.1.1
[storybook]
[storybook] info => Serving static files from ./../../../public at /
[storybook] info => Starting manager..
[storybook] WARN unable to find package.json for eslint
[storybook] WARN unable to find package.json for eslint-config-prettier
[storybook] WARN unable to find package.json for eslint-plugin-prettier
WARN unable to find package.json for husky
[storybook] WARN unable to find package.json for lint-staged
[storybook] WARN unable to find package.json for stylelint
[storybook] WARN unable to find package.json for stylelint-config-recommended
[storybook] WARN unable to find package.json for stylelint-order
[storybook] WARN unable to find package.json for stylelint-prettier
[storybook] info Addon-docs: using MDX2
[storybook] info => Using implicit CSS loaders
[storybook] info => Using default Webpack5 setup
[storybook] <i> [webpack-dev-middleware] wait until bundle finished
from blast.
It isn't starting correctly so you're not getting it in your output. Which node version are you using?
from blast.
v18.16.0 - it is quite recent-ish.
from blast.
Alright, just wanted to make sure. Can you share your project's tailwind config file structure? The error is saying it is failing to require it.
from blast.
Sure. It is quite standard and I am able to build it using vite.
let colors = require('tailwindcss/colors')
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
],
theme: {
extend: {
colors: {
'primary': colors.orange[600],
'primary-dark': colors.orange[700],
'muted': colors.gray[500],
'muted-more': colors.gray[400],
'heading': colors.gray[900]
},
},
},
plugins: [
require('@tailwindcss/container-queries'),
],
}
from blast.
See #98.
If you update your config file to use module.exports = {}
instead of export default {}
, it would work (obviously a workaround until #98 is addressed).
from blast.
Related Issues (20)
- Default brandImage config entry causes deprecation notice in PHP 8.1
- exited with code 1
- EventSource's response has a MIME type ("application/json") that is not "text/event-stream". Aborting the connection. HOT 1
- Script asset type HOT 2
- Error when running Blast with Invoker HOT 1
- [FEATURE-REQUEST] A static solution HOT 4
- How would I pass an object to a component inside a story? HOT 4
- How to implement component slots and named slots? HOT 4
- How to display a component that uses the $errors variable in Story with explicit passing?
- Add port option to the blast:launch command HOT 2
- ❤️ support publishing to chromatic via blast command HOT 1
- ❤️ add ability to set manifest path HOT 6
- ❤️ add colour and name output to what is running concurrently
- ❤️ Feat Req: Use tailwind screen sizes for storybook viewports setting HOT 2
- 💡 Feat Req: support multiple design urls per story HOT 1
- bug/feat 🐛 : support typescript in tailwind config tailwind.config.ts
- Is Blast for Tailwind only? HOT 7
- `blast:publish`: Uncaught SyntaxError: "undefined" is not valid JSON HOT 3
- Feature Request: Support `tailwind.config.js` in default ESM format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blast.