question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module 'indent-string'

See original GitHub issue
  • prettier-eslint-cli version: 5.0.0
  • prettier version: 1.18.2
  • eslint version: 6.1.0

Relevant code/config.

// Doesn't matter

What you did:

./node_modules/.bin/prettier-eslint-check '**/*.js'

What happened:

Error: Cannot find module 'indent-string'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/mvila/dev/layrjs/deepr/node_modules/.registry.npmjs.org/prettier-eslint-cli/5.0.0/node_modules/prettier-eslint-cli/dist/format-files.js:36:44)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

Reproduction:

Run a fresh install of prettier-eslint-cli v5.0.0.

Problem description:

The ‘indent-string’ dependency is missing in production environment.

Suggested solution:

In package.json, move the ‘indent-string’ dependency from "devDependencies" to "dependencies".

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mvilacommented, Nov 26, 2021

@timruiterkamp I don’t use prettier-eslint-cli because I don’t use ESLint anymore. I think that the combo Prettier + TypeScript (with the right settings) is good enough to ensure code quality.

0reactions
timruiterkampcommented, Nov 26, 2021

@mvila What is your alternative? I might have to switch too then, i am running a graphql codegen and use the prettier-eslint-cli to format the generated files

Read more comments on GitHub >

github_iconTop Results From Across the Web

indent-string - npm
Start using indent-string in your project by running `npm i indent-string`. There are 1022 other projects in the npm registry using ...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
When you are using ECMAScript modules you are forced to provide the file extension: https://nodejs.org/api/esm.html# ...
Read more >
Error: Cannot find module "ionic-native"
I cannot make it running. I started having this error after importing the "Auth" and "User" classes: import { HomePage } from './....
Read more >
Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found