Skip to content

Error: Cannot find module 'eslint-config-xo' #543

@AndrewMSHowe

Description

@AndrewMSHowe

Hi, I wanted to try this out. I installed xo:

$ sudo npm install --global xo
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

changed 786 packages, and audited 787 packages in 37s

106 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Then I ran it as described in the readme:

$ xo --help
/usr/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js:41
            throw error;
            ^

Error: Cannot find module 'eslint-config-xo'
Require stack:
- /home/andrew/__placeholder__.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.resolve (internal/modules/cjs/helpers.js:80:19)
    at resolve (/usr/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js:28:50)
    at resolveFrom (/usr/lib/node_modules/xo/lib/options-manager.js:47:66)
    at Object.<anonymous> (/usr/lib/node_modules/xo/lib/options-manager.js:65:4)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/andrew/__placeholder__.js' ]
}

It doesn't seem to matter what directory I run it from, either my home dir with no node stuffs or from my project dir. All I have npm installed globally is npm and xo@0.40.0 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions