[ESLint] TypeError: this.libOptions.parse is not a function

avatar
Borislav Hadzhiev

Last updated: Feb 29, 2024
3 min

banner

# Table of Contents

  1. [ESLint] TypeError: this.libOptions.parse is not a function
  2. Downgrading your version of ESLint
  3. Upgrade WebStorm to version 2022.2.3 or more recent

# [ESLint] TypeError: this.libOptions.parse is not a function

The ESLint error "TypeError: this.libOptions.parse is not a function" occurs because the WebStorm ESLint plugin tries to access a function that has been removed in ESLint version 8.23.

There are 2 main ways to solve the error:

  1. Update WebStorm to version 2022.2.3 or more recent. (recommended)
  2. Downgrade your version of the ESLint package to version 8.22.0.

# Downgrading your version of ESLint

The WebStorm ESLint plugin tries to access a function that has been removed in ESLint version 8.23.

However, the function is available in ESLint version 8.22.

If you'd rather downgrade your ESLint version than update WebStorm, open your terminal and issue the following command.

shell
# with NPM npm install eslint@8.22.0 --save-exact --save-dev

npm install specific version of eslint

If you use the yarn package manager, issue the following command instead.

shell
# with YARN yarn add eslint@8.22.0 --dev --exact

yarn install specific version of eslint

If you get an error when issuing the command, try to rerun it with the --force flag.

shell
npm install eslint@8.22.0 --force --save-exact --save-dev

npm install specific version of eslint with force flag

The --save-exact flag pins the version of the package in your package.json file.

If you still weren't able to install version 8.22.0, try to uninstall ESLint and then install the specific version.

shell
# with NPM npm uninstall eslint npm install eslint@8.22.0 --save-exact --save-dev

Here are the equivalent yarn commands.

shell
yarn remove eslint yarn add eslint@8.22.0 --dev --exact

After you run the command, ESLint will be pinned to version 8.22.0 and the issue should be resolved.

pin eslint version

Try to restart your IDE and development server if the error persists.

You can also pin the version of eslint by manually replacing its current version in the devDependencies object in your package.json file.

package.json
{ "devDependencies": { "eslint": "8.22.0" } }

Make sure to run the npm install or yarn install command if you manually pin your version.

shell
# with NPM npm install # with YARN yarn install

If the error is not resolved, remove the node_modules directory and reinstall your dependencies.

Issue the following commands on Windows.

shell
# ๐Ÿ‘‡๏ธ (Windows) delete node_modules and package-lock.json rd /s /q "node_modules" del package-lock.json del -f yarn.lock # ๐Ÿ‘‡๏ธ clean npm cache npm cache clean --force npm install

If you are on macOS or Linux, issue the following commands instead.

shell
# ๐Ÿ‘‡๏ธ (macOS/Linux) delete node_modules and package-lock.json rm -rf node_modules rm -f package-lock.json rm -f yarn.lock # ๐Ÿ‘‡๏ธ clean npm cache npm cache clean --force npm install

Check if the error persists after pinning ESLint's version.

# Upgrade WebStorm to version 2022.2.3 or more recent

A fix has been introduced in WebStorm version 2022.2.3, so make sure your IDE runs a version greater than or equal to 2022.2.3.

You can check your IDE's version by clicking on Help in the top menu and selecting About.

check webstorm version

If your version of WebStorm is older than 2022.2.3, you have to update your IDE.

You can follow the instructions on how to update WebStorm in this section of the docs.

For example, if you click on the cogwheel icon in the top right corner, you will likely get an option to update the IDE.

click cogwheel update webstorm

You can also click on Help in the top menu and then select Check for Updates.

click help check for updates

A pop-up box will appear toward the bottom of the screen. Click on the Update... button.

click update button

Finally, click on the Update and Restart button.

click update and restart

If you have difficulties updating WebStorm to a version >= 2022.2.3, follow the instructions in this section of the official docs.

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.

Copyright ยฉ 2025 Borislav Hadzhiev