On this page
Help Center/ CodeArts Build/ FAQs/ Using npm for Build/ eslint: error 'CLODOP' is not defined

eslint: error 'CLODOP' is not defined

Updated on 2023-11-28 GMT+08:00

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 */
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback