Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockercompose: *** Cannot find ESLint loader (eslint-loader). *** #476

Closed
teodem opened this issue Nov 29, 2022 · 1 comment
Closed

Dockercompose: *** Cannot find ESLint loader (eslint-loader). *** #476

teodem opened this issue Nov 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@teodem
Copy link

teodem commented Nov 29, 2022

i'm trying to run docker-compose up -d for the build of my application (based on this example). The original repo works, but after some work on it, it is now not working anymore. The problem is that when i run the docker compose command, i get this error from the "Dockerfile.democlient":

0 0.286 yarn run v1.22.5
#0 0.305 $ craco build
#0 1.867 craco:  *** Cannot find ESLint loader (eslint-loader). ***
#0 1.903 Creating an optimized production build...
#0 3.627 
#0 3.628 warn - Tailwind is not purging unused styles because no template paths have been provided.
#0 3.629 warn - If you have manually configured PurgeCSS outside of Tailwind or are deliberately not removing unused styles, set `purge: false` in your Tailwind config file to silence this warning.
#0 3.629 warn - https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
#0 23.64 Failed to compile.
#0 23.64 
#0 23.64 TS2769: No overload matches this call.
#0 23.64   Overload 1 of 2, '(props: BrowserRouterProps | Readonly<BrowserRouterProps>): BrowserRouter', gave the following error.
#0 23.64     Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<BrowserRouter> & Readonly<BrowserRouterProps>'.
#0 23.64   Overload 2 of 2, '(props: BrowserRouterProps, context: any): BrowserRouter', gave the following error.
#0 23.64     Type '{ children: Element; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<BrowserRouter> & Readonly<BrowserRouterProps>'.
#0 23.64      7 |
#0 23.64      8 | ReactDOM.render(
#0 23.64   >  9 |   <BrowserRouter>
#0 23.64        |    ^^^^^^^^^^^^^
#0 23.64     10 |     <App />
#0 23.64     11 |   </BrowserRouter>,
#0 23.64     12 |   document.getElementById("root")
#0 23.64 
#0 23.64 
#0 24.21 error Command failed with exit code 1.
#0 24.21 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------

Here the client dockerfile:

FROM node:16.10.0

WORKDIR /app

COPY ["package.json", "yarn.lock", "./"]

RUN yarn

COPY . .

EXPOSE 3000

RUN yarn build

CMD ["yarn", "start"]

Here the Dockercompose file:

version: "3"

services:
  server:
    platform: linux/amd64
    build:
      context: ./server
      dockerfile: ./Dockerfile.demoserver
    ports:
      - "5000:5000"
  client:
    build:
      context: ./client
      dockerfile: ./Dockerfile.democlient
    ports:
      - "3000:3000"

Here the craco.config.js

module.exports = {
  eslint: {
    enable: false
  },
  style: {
    postcssOptions: {
      plugins: [require("tailwindcss"), require("autoprefixer")],
    },
  },
};
@teodem teodem added the bug Something isn't working label Nov 29, 2022
@dilanx
Copy link
Owner

dilanx commented Nov 30, 2022

This doesn't look like an issue with craco. Check out the documentation for React Router here.

@dilanx dilanx closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants