Questions tagged [craco]
Craco stands for Create React App Configuration Overrides - an easy and comprehensible configuration layer for create-react-app.
181
questions
0
votes
0
answers
16
views
Dockerfile build takes too long then crashes with craco - either missing tailwindcss module or heap memory
I am a beginner with Docker and I am trying to prepare and containerise my react frontend for a production build in order to deploy it to AWS ECS.
My frontend folder is around 660mb with all its ...
0
votes
0
answers
21
views
Why I have component export error on app page
When I start my project a have error in dev tools console:
Uncaught TypeError: Cannot read properties of undefined (reading 'default')
at Module.AddLesson (groupName.tsx:49:1)
at ./src/pages/...
0
votes
0
answers
10
views
Deploying react app with craco on aws amplify
I have a blocking issue since days
I tried to deploy this repo on aws amplify and the build fail:
https://github.com/metaplex-foundation/candy-machine-ui
Everything works perfect in local (yarn run ...
1
vote
0
answers
28
views
craco don't work with react-scripts@^5.0.1
it shows me this error:
yarn start ✔ 27s
yarn run v1.22.19
$ craco start
Failed to compile.
For the selected environment is no default ...
0
votes
1
answer
20
views
Module build failed (from ./node_modules/craco-less/node_modules/less-loader/dist/cjs.js):
Here is the package.json from my project, I've ran npm install.
{
"name": "myProject",
"version": "0.1.0",
"private": true,
"dependencies&...
1
vote
0
answers
31
views
Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it). Here have to add that flag
const { addAfterLoader, loaderByName } = require("@craco/craco");
module.exports = {
webpack: {
configure(webpackConfig) {
addAfterLoader(webpackConfig, loaderByName("babel-...
0
votes
1
answer
27
views
Does craco override existing config settings?
When using craco, I wonder if the existing configuration file is overwritten or added to the existing options?
//craco.config.ts
module.exports = {
babel: {
presets: ["@emotion/babel-...
0
votes
0
answers
35
views
tailwind config and className doesn't work on my react app
as I install tailwind and craco as the same tailwind document. but after all it doesn't make any change in my styles. ofcourse my app can recognize the tailwind classes but it doesn't make any change ...
0
votes
0
answers
40
views
Tailwind CSS not working when I use the classes
I've followed all the steps shown in the documentation, but still my tailwindcss is not working.
Here are the codes below, what else should I need to do ?
Here is the code , where it fails
App.js
...
0
votes
1
answer
60
views
Webpack stuck at compiling
I'm using craco to override the create-react-app webpack config because I need to build my app as a micro-app.
My overrides :
module.exports = {
webpack: {
configure: (config) => {
...
0
votes
0
answers
18
views
Encapsulated styles in react
I have two react projects (A, B). I have to include the project A inside the project B.
A: Made it with CRA, craco and scss modules.
B: Made with webpack.
The problem is that the styles of the project ...
1
vote
1
answer
132
views
Cannot proxy requests with craco config
I am trying to proxy requests with craco config. however the proxy seems to be ignored. Why is it not working?
I have a create-react-app project that I started using:
npx create-react-app check-proxy-...
1
vote
0
answers
92
views
REACTJS - How to load images in a Single-Spa microfrontend built with CRACO?
I have a microfrontends application in REACT JS managed with Single SPA. All our MFE are built with webpack and created with CRA.
We now want to migrate all of them to CRACO. Everything works, except ...
0
votes
1
answer
243
views
Add Polyfill to craco, issue add a fallback 'resolve.fallback'
I'm getting an error:
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-...
0
votes
1
answer
62
views
Facing build issue after upgrade of react-scripts
After upgrading react-scripts to version 5, i am facing build issue. Some files are missing after running build command. Sharing before and after screen shot of build command.
Also using craco latest ...
0
votes
0
answers
19
views
Module not found: Can't resolve '..' in 'myApp\node_modules\@jest\core\build'
I am working on a monorepo which has Craco configured in it over webpack config. I am implementing react lazy loading which is working fine while fetching from same folder, but getting error while ...
2
votes
0
answers
55
views
Version upgrade issue of react-scripts v4-> v5 and craco v6 -> v7
In existing project we were trying to upgrade react-scripts from V4.0.3 => V5.0.1. After upgrade, Craco also need upgradation, so we have upgraded Craco V6.1.2 => V7.0.0. It creating issue with ...
1
vote
0
answers
44
views
How to Change style order in Antd and LESS?
I'm using antd, craco with less-module.
And I created module.less file for antd customization test.
Result is image below.
I want to change css style order like image above.
And this is my craco....
0
votes
0
answers
43
views
Lerna using create-react-app with craco and relay error
I'm setting up a multipackage project using Lerna, craco and Relay.
I'm following the documentation from craco, create-react-app, babel-plugin-relay
package.json
{
"name": "@monorepo/...
1
vote
0
answers
53
views
React CRA typescript eslint, build error, ReferenceError: process is not define
The application stopped starting at the same place, I updated all the packages, added сrako config, the application started, but there is an error in the browser console
path.js:24 Uncaught ...
0
votes
1
answer
95
views
My tailwind does not apply to my react typescript project
I followed the tutorial on the tailwind website, and I can't apply tailwind to my project.
I really don't understand....
Here are my files :)
App.css
@tailwind components;
@tailwind utilities;
app....
0
votes
0
answers
29
views
npm start on github actions starts the dev server on a random ip
Normally, when you run npm start, it starts the dev server at http://localhost:3000. However, for some reason, when I use the following action,
- name: Install frontend dependencies from package-lock....
1
vote
0
answers
149
views
How to set craco config to handle `transformIgnorePatterns` for testing?
For running the tests in a project that is using Create React App 5 I need to set the transformIgnorePatterns property for some dependencies that weren't transpiled.
I can do it from the command line ...
0
votes
0
answers
172
views
node v16.8.0 craco: *** Cannot find ESLint loader (eslint-loader). ***
I am trying to start a project with node 16.8.0 (is an old project) taken from GitHub for a school project. There seems to be a problem with craco, the same as this question.
The solution described ...
-1
votes
1
answer
53
views
Cors error with embed React while in development mode
I'm trying to embed a React app inside a page rendered by a Drupal 9.4.x site.
It works fine on the online server, with the build script.
However, if i try to load the page locally, with the ...
0
votes
1
answer
21
views
i18next.use and all other properties are undefined with webpack craco config
I'm migrating my create-react-application to craco and upgraded react-scripts from v3.4.1 to v4.03. After react-script version update and craco i18next stopped working.
/* craco.config.js */
const ...
0
votes
1
answer
96
views
Can't use components importing HeadlessUI Dialog in a different project
I'm working in a component library that has a custom Dialog component, which uses the Dialogfrom @headlessui/react. The problem is that whenever I try to use this component I get this error:
Warning: ...
1
vote
2
answers
248
views
Import a YAML file in React with craco and yaml-loader
I am having a quite difficult time trying to import a YAML file as a JS object in my React code.
I made this simple and reproductible CodeSandbox example built with create-react-app to show my problem....
1
vote
1
answer
640
views
React / Craco produce a development build that I can deploy to my dev server
I have a React app which has craco configured. I have the standard scripts for
"start": "craco start",
"build": "craco build",
I need to be able to create &...
1
vote
0
answers
60
views
Can't configure Tailwind inside React MicroFrontends App
Trying to configure Tailwind into my MicroFrontend App.
There are some problems with postCss, which Craco helps to solve, but for that I need to use Craco inside npm start script, like that:
"...
0
votes
0
answers
67
views
React build using crace_react_scoped_css overwriting and not including some CSS files
I used nice page static page builders to generate static pages in react js. and use React_craco_scoped_css plugin along with craco to scoped my CSS so it wont overwrite same class
When i do npm start, ...
1
vote
0
answers
360
views
"Module parse failed: Unexpected character '@' (1:0)" when i executed cypress with CRACO
I have a project with CRA 5 and I needed to add some aliases so I had to install craco but I have a problem, when I run my tests with cypress I get this error:
Error: Webpack Compilation Error
./src/...
2
votes
0
answers
325
views
error after installing npm package ,You may need an additional loader to handle the result of these loaders
I've installed the npm package @yaireo/tagify v4.16.4 however when I try to start my react app I get the following error:
./node_modules/@yaireo/tagify/dist/tagify.js 594:33
Module parse failed: ...
0
votes
0
answers
582
views
Configuration.resolve has an unknown property 'fallback'. These properties are valid:
I got this error in my react project.
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.resolve has an unknown ...
1
vote
0
answers
204
views
run create react app using craco build without magnification
Anyone know how to get Create React app to build without magnification using craco ?
I have tried the following:
"build-dev": "BUILD_PATH='../build' env-cmd -f ../.env.development ...
0
votes
0
answers
327
views
Cannot find module '@components/avatar' or its corresponding type declarations
I have a TS error that I don't know how to fix. Avatar is a custom component.
import Avatar from "@components/avatar"
Cannot find module '@components/avatar' or its corresponding type ...
0
votes
0
answers
118
views
craco' is not recognized as an internal or external command, operable program or batch file
I have downloaded a project from github and need to run it but it says craco not recognized i tried to install craco but face following error
npm WARN ERESOLVE overriding peer dependency
npm WARN ...
0
votes
0
answers
54
views
Error while building, using craco 7.0.0-alpha.7
I am trying to use Purgecss with React.js, and testing the craco method from documentation, but when I build the project using craco, it gives me this error: original.line and original.column are not ...
0
votes
0
answers
98
views
MUI with React on SSR .net (c#)
Hey I'd like to use some MUI components in a existent React SSR application (Craco). The server side uses C# (.net 4.8).
I added these packages to my project
"@emotion/react": "^11....
0
votes
0
answers
261
views
TS postcss-rtl TypeError: Cannot read properties of undefined (reading 'unprefixed')
I have this craco.config.js file in a yarn create-react-app typescript and it doesn't start if I add the postcss it doesn't work.
postcss: {
plugins: [require("postcss-rtl")()]
...
2
votes
1
answer
353
views
Create React App / Craco : how to implement "localIdentName" option for changing classnames?
How to change classnames pattern using "localidentname" in create-react-app / @craco, as described here:
https://webpack.js.org/loaders/css-loader/#localidentname
I use dart-sass for styles.
...
0
votes
1
answer
62
views
When run npm test in reactjs part of ASP.NET Boilerplate Web Application SyntaxError: Cannot use import statement outside a module
I'm use ASP.NET Boilerplate Web Application for my project when i want to run the default test for frontend of project with npm test facing this error:
FAIL src/App.test.tsx
● Test suite ...
0
votes
1
answer
2k
views
JEST configuration with craco
I'm building react app
I use craco to make configuration simplify and have set up alise
But when I run test command, the following error is displayed.
Cannot find module '@layouts/BlankLayout' from '...
0
votes
0
answers
345
views
create-react-app config override for build
I'm experiencing major butthurts with create-react-app, webpack, babel, craco, etc.
The Problem
I've given a js lib with a bunch of react components that I need to use. Sorry, it's a closed-source ...
1
vote
1
answer
408
views
Customize ant design with craco for existing react template
I'm using a ready-made react template starter kit in a project. Sass is used in the template and craco is preferred for configuration. As a UI library, there is reactstrap.
But I need to include ant ...
1
vote
0
answers
182
views
react js override webpack config for javascript & css bundle with craco
i have a react application for which i want to modify the javascript and css bundles
which are building by the webpack every time
the App is build to avoid the browser caching issue
for example right ...
0
votes
1
answer
173
views
react-scripts + @ckeditor5, latest stable versions incompatibility
I've been using a combination of react-scripts + craco to build a project using @ckeditor, but unfortunately it seems that with recent updates to some dependencies I am no longer able to build the ...
0
votes
0
answers
472
views
Eslint + typescript paths aliasing with craco Unable to resolve path to module '@SomeFolder/SomeComponent'
can someone pls explain to me why I am still getting the error when I'm using
import SomeComponent from '@someFolder/SomeComponent';
this is my error
Unable to resolve the path to module '@SomeFolder/...
0
votes
0
answers
120
views
React build stuck with webpack override for wasm
I am using CRACO along with CRA. start works, but build is stuck, without any errors. memory usage is fixed and does not kill it even if I quit the process.
craco - 6.1.2
react-scripts - 4.0.3
react - ...
0
votes
0
answers
181
views
Attempted import error: 'common/configs/fire' does not contain a default export (imported as 'refreshDatabase')
I'm using craco to create react app. Here is my tsconfig:
{
"compilerOptions": {
"target": "es6",
"lib": [
"dom",
"dom....