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

Build failing even no errors #10645

Closed
dalisoft opened this issue Mar 3, 2021 · 2 comments
Closed

Build failing even no errors #10645

dalisoft opened this issue Mar 3, 2021 · 2 comments

Comments

@dalisoft
Copy link

dalisoft commented Mar 3, 2021

Describe the bug

Build failing even no errors

Did you try recovering your dependencies?

Yes, i tried

❯ npm -v
6.14.11
❯ yarn -v
1.22.10

Which terms did you search for in User Guide?

My case similar to #9887, but my output isn't error

Environment

❯ npx create-react-app --info
npx: installed 67 in 5.921s

Environment Info:

  current version of create-react-app: 4.0.3
  running from /Users/dalisoft/.npm/_npx/38237/lib/node_modules/create-react-app

  System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  Binaries:
    Node: 15.10.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - ~/.npm-global/bin/npm
  Browsers:
    Chrome: 89.0.4389.72
    Edge: Not Found
    Firefox: 86.0
    Safari: 14.0.3
  npmPackages:
    react: ^17.0.1 => 17.0.1 
    react-dom: ^17.0.1 => 17.0.1 
    react-scripts: 4.0.3 => 4.0.3 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. Create project with CRA + TS
  2. Build project on CI
  3. See error

Expected behavior

Successfully building

Actual behavior

yarn run v1.22.5
$ react-scripts build
Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

src/components/handlers/catcher.tsx
  Line 25:5:  Unexpected console statement  no-console

src/pages/libraries/libraries.tsx
  Line 41:3:  Unexpected console statement  no-console

src/pages/monitors/list.tsx
  Line 91:31:  Unexpected console statement  no-console
  Line 97:11:  Unexpected console statement  no-console

src/pages/playlists/playlists.tsx
  Line 76:42:  Unexpected console statement  no-console
  Line 81:11:  Unexpected console statement  no-console

src/stores/app.ts
  Line 57:5:  Unexpected console statement  no-console

src/stores/monitors.ts
  Line 281:7:  Unexpected console statement  no-console


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

@dalisoft
Copy link
Author

dalisoft commented Mar 3, 2021

My ESLint config

{
  "extends": "airlight-react",
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "rules": {
    "react/jsx-props-no-spreading": "off",
    "react/react-in-jsx-scope": "off",
    "no-console": "warn",
    "jsx-a11y/label-has-associated-control": "off",
    "@typescript-eslint/indent": "off",
    "max-lines-per-function": ["error", { "max": 60 }],
    "max-nested-callbacks": ["error", { "max": 5 }],
    "max-depth": ["error", { "max": 5 }],
    "max-lines": ["error", { "max": 300 }],
    "complexity": ["error", { "max": 10 }]
  }
}

My tsconfig

{
  "compilerOptions": {
    "target": "es5",
    "baseUrl": "src",
    "lib": ["dom", "dom.iterable", "esnext"],
    "downlevelIteration": true,
    "typeRoots": ["./node_modules/@types", "./typings"],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "experimentalDecorators": true,
    "strict": true,
    "inlineSourceMap": true,
    "removeComments": true,
    "alwaysStrict": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "strictNullChecks": true,
    "strictPropertyInitialization": true,
    "strictFunctionTypes": true,
    "strictBindCallApply": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": ["src", "typings", "tests"],
  "exclude": ["node_modules"]
}

@dalisoft
Copy link
Author

dalisoft commented Mar 3, 2021

Sorry,
adding this line fixes this

version: 2
jobs:
  build-test-install-deploy:
    docker:
      # specify the version you desire here
      - image: circleci/node:10

        # Specify service dependencies here if necessary
        # CircleCI maintains a library of pre-built images
        # documented at https://circleci.com/docs/2.0/circleci-images/
        # - image: circleci/mongo:3.4.4

        # Supress ESLint errors
        environment:
+       ESLINT_NO_DEV_ERRORS: 'true'
+       DISABLE_ESLINT_PLUGIN: 'true'

Note: make sure add true, not 1 or any else value

@dalisoft dalisoft closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant