DEV Community

Discussion on: FullStack React & Django Authentication : Django REST ,TypeScript, Axios, Redux & React Router

Collapse
 
okechedu profile image
Edward Okech

@koladev I have also realised that when running the command
$ yarn start after adding the craco.config.js file the following error is thrown

PS C:\Users\Administrator\Documents\EdwardFiles\Python\django_projects\Zetech-Uni-Portal\frontend> yarn start
yarn run v1.22.19
warning ..\..\..\..\..\..\package.json: No license field
$ craco start
C:\Users\Administrator\Documents\EdwardFiles\Python\django_projects\Zetech-Uni-Portal\frontend\node_modules\@craco\craco\lib\features\webpack\style\postcss.js:54
                craPlugins = match.loader.options.plugins();
                                                  ^

TypeError: match.loader.options.plugins is not a function

Enter fullscreen mode Exit fullscreen mode

After a bit of digging i found this article
github.com/facebook/create-react-a...

basicly replacing the following line in the croca.config.js file solves this issue.

module.exports = {
    style: {
       // Replace postcss with postcssOptions
        postcssOptions: {
        plugins: [require("tailwindcss"), require("autoprefixer")],
      },
    },
  };
Enter fullscreen mode Exit fullscreen mode

Thank you