Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

710
Visualizações
Javascript Eslint Error: Cannot find module 'optionator'

We've got some error and we try to install optionator but nothing happened. We're using Linux

We're trying to npm i from package.json which include this dependencies

"optionalDependencies": { 
  "eslint-config-<name>": "github:<username>/<repo>" 
} 

then we tried to run npm i optionator but still get the same error


    Error: Cannot find module 'optionator'
    Require stack:
    - /usr/share/nodejs/eslint/lib/options.js
    - /usr/share/nodejs/eslint/lib/cli.js
    - /usr/share/nodejs/eslint/bin/eslint.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/usr/share/nodejs/eslint/lib/options.js:12:20)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/usr/share/nodejs/eslint/lib/options.js',
    '/usr/share/nodejs/eslint/lib/cli.js',
    '/usr/share/nodejs/eslint/bin/eslint.js'

Anyone who experienced this, please help us. Thanks

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Need to give full access to package-lock.json

about 4 years ago · Juan Pablo Isaza Relatório

0

So if you have not done an npm init then that is the issue. npm init initializes the project and will add the node_modules folder to the working directory, this will set it up as a node project. Then to install a dependency just run a npm install <dependency> although I do recommend doing a --save afterwards as well as it just ensures that the package is put in your current directory

$ npm init
$ npm install optionator --save

npm-init | npm Docs

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda