Razzle: Razzle does not start in development mode

Created on 24 Mar 2021  ·  9Comments  ·  Source: jaredpalmer/razzle

🐛 Bug report

Current Behavior

After upgrade to razzle 4, when I run yarn start it's not running in dev mode. Just closes after ✨ Done

➜ yarn start
yarn run v1.22.4
$ razzle start
If you have issues with css make sure postcss resolves to v8.2.4.
See: https://razzlejs.org/getting-started#common-problems

CssMinimizerPlugin currently uses clean-css,
we will switch to cssnano once it supports postcss v8.2.4.

 WAIT  Compiling...

✨  Done in 4.76s.

Additional context

razzle.config.js

const path = require('path')
const fs = require('fs')
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin');

module.exports = {
  options: {
    buildType: 'spa'
  },
  plugins: [
    {
      name: 'typescript',
      options: {
        useBabel: true,
        forkTsChecker: {
          tslint: false,
        },
      },
    },
  ],
  modifyWebpackConfig({ webpackConfig }) {
    webpackConfig.resolve.modules.unshift(path.resolve(__dirname, 'src'))
    webpackConfig.plugins.push(new AntdDayjsWebpackPlugin())

    return webpackConfig
  },
}

Your environment

| Software | Version(s) |
| ---------------- | ---------- |
| Razzle | 4.0.3
| Razzle Plugins | razzle-plugin-typescript: 4.0.3
| Node | v14.15.1
| npm/Yarn | yarn: 1.22.4
| Operating System | macOS 11.1
| TypeScript | typescript: 4.1.3
| React | react: 17.0.1

All 9 comments

You don’t need typescript plugin in 4.0.3. Also use compilerOptions.paths in tsconfig

Try setting options.verbose to true

@fivethreeo thx
I fixed this problem, thank to "verbose" option (I had wrong setup for forkTsChecker in the typescript plugin section)

And now, when app started, I have only blank page in the browser (without any errors in the console).

Any other suggestions?

Also use compilerOptions.paths in tsconfig

What do you mean? I have some aliases here, what I should add?

Probably the html template.

Probably the html template.

That's right, thank you!

Probably we should add information about template in the upgrade guide, because html template had changed, and old template doesn't work with the razzle 4

Docs updated, closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corydeppen picture corydeppen  ·  3Comments

sebmor picture sebmor  ·  4Comments

MaxGoh picture MaxGoh  ·  4Comments

alexjoyner picture alexjoyner  ·  3Comments

mhuggins picture mhuggins  ·  3Comments