How to resolve aliases in Storybook?

Just add this in your .storybook/main.js const path = require(‘path’); module.exports = { “stories”: [ “../components/**/*.stories.mdx”, “../components/**/*.stories.@(js|jsx|ts|tsx)” ], “addons”: [ “@storybook/addon-links”, “@storybook/addon-essentials”, ‘@storybook/preset-scss’, ], webpackFinal: async (config) => { config.resolve.alias = { …config.resolve.alias, ‘@/interfaces’: path.resolve(__dirname, “../interfaces”), }; return config; } } here interface is folder at my project root It works For Me

Location is not defined error in React + Next.js?

Can you show your imports, because it could be that you are importing router from ‘next/client’ Assuming that you are using functional-based component You need to import router as follows: import {useRouter} from “next/router”; in your function body: const router = useRouter(); Edit, those who’re using NextJS v13+ The router has been moved from next/router … Read more

nextjs – next build with NODE_ENV=development

UPDATE 2022-11-23: See how-to-set-environment-variables-from-within-package-json. In short: “start:dev”: “NODE_ENV=development next start” You might need cross-env (on Windows ? I don’t know): “start:dev”: “cross-env NODE_ENV=development next start” More specific documentation is now available (and maybe requirements also have changed, or maybe not): environment-variable-load-order: … Note: The allowed values for NODE_ENV are production, development and test. non-standard-node-env: … … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)