Skip to content

2.21.0 error: "Cannot find module 'typescript' #1805

Closed
@illepic

Description

Updating from 2.20.2 to 2.21.0 results in the following output:

Oops! Something went wrong! :(

ESLint: 7.2.0

Error: Failed to load plugin 'import' declared in '.eslintrc.js » eslint-config-airbnb-base » /home/illepic/dev/particle/node_modules/eslint-config-airbnb-base/rules/imports.js': Cannot find module 'typescript'
Require stack:
- /home/illepic/dev/particle/node_modules/eslint-plugin-import/lib/ExportMap.js
- /home/illepic/dev/particle/node_modules/eslint-plugin-import/lib/rules/named.js
- /home/illepic/dev/particle/node_modules/eslint-plugin-import/lib/index.js
- /home/illepic/dev/particle/node_modules/eslint/lib/cli-engine/config-array-factory.js
- /home/illepic/dev/particle/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js
- /home/illepic/dev/particle/node_modules/eslint/lib/cli-engine/cli-engine.js
- /home/illepic/dev/particle/node_modules/eslint/lib/eslint/eslint.js
- /home/illepic/dev/particle/node_modules/eslint/lib/eslint/index.js
- /home/illepic/dev/particle/node_modules/eslint/lib/cli.js
- /home/illepic/dev/particle/node_modules/eslint/bin/eslint.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (/home/illepic/dev/particle/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/home/illepic/dev/particle/node_modules/eslint-plugin-import/lib/ExportMap.js:46:19)
    at Module._compile (/home/illepic/dev/particle/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)

Installing typescript locally (npm install typescript) resolves the error. Unfortunately, this is not a typescript project.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions