Troubleshooting
Broken preview links on vercel or netlify
Sometimes you experience unexpected errors on preview links but not on local development server. Go through the checklist to avoid issues.
- ✅ Test on local for errors
- ✅ Cleanup Project dir
- ✅ Choose the correct rendering mode
- ✅ Check dependencies configuration
Styles in production build are missing
If you're using TailwindCSS you probably get missing styles in production build. This happens because Tailwind is optimize final build size and strips classes out which are not needed. But Tailwind sometimes doesn't know that you need this class since maybe its added dynamically on runtime.
Useful Tips
Test on local for errors
If you're experience unclear errors on a preview link then try to build it on local first and examine
cd ~/myproject-with-99-problems
yarn build && yarn start
Cleanup project dir from cached files
Happens sometimes if you merge or pull other branches and stuff get mixed up. You can try to clear up cached files.
rm -rf node_modules
rm -f .nuxt
rm -f yarn.lock
yarn
Avoid override component names
Nujek is built to show bloks dynamically if they are defined and follow the naming convention of Blok<Name>.vue
. You should absolutely avoid to rename the component name in the component definition.
<script>
export default {
name: 'MyPrettyAwesomeExampleBlok', // <-- Dont do this
props: {
blok: {
type: Object,
default: () => {}
}
},
}
</script>