Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

694
Views
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 answers
Answer question

0

Need to give full access to package-lock.json

about 4 years ago · Juan Pablo Isaza Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!