Help Center/ CodeArts Build/ FAQs/ npm Builds/ Why Am I Seeing the Error Message "eslint: error 'CLODOP' is not defined"?
Updated on 2024-10-10 GMT+08:00

Why Am I Seeing the Error Message "eslint: error 'CLODOP' is not defined"?

Symptoms

When the npm build task is executed, the following error information is displayed in the log.

Module Error (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):

***//public/LodopFuncs.js
  79:25  error  'getCLodop' is not defined  no-undef
  80:27  error  Empty block statement       no-empty
  89:21  error  'CLODOP' is not defined     no-undef

Cause Analysis

If the function in the LodopFuncs.js file is not defined, check the file first. If the file is normal, the error may be caused by non-compliance with the ESLint specifications.

Solution

  1. Check whether the getCLodop function is defined in the LodopFuncs.js file.
  2. If the file is normal, add the following command to the header of the file that fails to pass the ESLint check to ignore the ESLint check:
    /* eslint-disable */