Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error: Could not find module remark-preset-lint-recommended #155

Open
oupala opened this issue Dec 14, 2017 · 12 comments
Open

Error: Could not find module remark-preset-lint-recommended #155

oupala opened this issue Dec 14, 2017 · 12 comments

Comments

@oupala
Copy link

oupala commented Dec 14, 2017

I get an error Error: Could not find module remark-preset-lint-recommended while trying to use linter-markdown.

I'm using Atom 1.23.0 for debian. I installed the following package locally, in the same directory as the markdown file I want to lint:

  • "remark-preset-lint-consistent": "^2.0.1",
  • "remark-preset-lint-markdown-style-guide": "^2.1.1",
  • "remark-preset-lint-recommended": "^3.0.1"

I get a basic package.json file

$ more package.json 
{
  "name": "dummy-package",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "[email protected]"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "remark-preset-lint-consistent": "^2.0.1",
    "remark-preset-lint-markdown-style-guide": "^2.1.1",
    "remark-preset-lint-recommended": "^3.0.1"
  }
}

It is not clear for me how to install and use linter-markdown for Atom.

@wooorm
Copy link
Contributor

wooorm commented May 17, 2018

@oupala If you use your own configuration, for example if you’d rather not use the defaults, you can use locally installed modules with a remark config file. If you plan on doing this, could you show me the config file as well?

Otherwise, if you’d like to stick with the defaults, you don’t need to add any dependencies.

@oupala
Copy link
Author

oupala commented May 17, 2018

For a default configuration, I don't need any dependencies. But I still have to install remark and remark-cli globally. Am I right?

If I want my own configuration, I have 2 solutions:

  • either I install all dependencies globally, alongside remark and remark-cli
  • either I want a local and specific configuration, I have to add the dependencies in the package.json file

Am I still right?

If yes, I think that it needs to be more clearly explained in the README file.

@wooorm
Copy link
Contributor

wooorm commented May 17, 2018

For a default configuration, I don't need any dependencies. But I still have to install remark and remark-cli globally. Am I right?

If you’re not going to configure linter-markdown, you don’t need to install anything other that linter-markdown in atom.

If I want my own configuration, I have 2 solutions:

Yes, but your first solution doesn’t work currently.

If yes, I think that it needs to be more clearly explained in the README file.

Feel free to create a PR for the docs!

@oupala
Copy link
Author

oupala commented May 19, 2018

PR proposed, see #167

@charlesangus
Copy link

I'm rather confused. If want to use the default configuration that comes "out of the box" with the Atom linter-markdown package, all is well, but if I want to do any configuration whatsoever, I have to install other stuff?

This seems bizarre. I would have thought that I could have just tossed some settings in a ~/.remarkrc file to disable some of the default stuff.

As a novice user, I'm more than satisfied with the default set of plugins. I just want to tweak the settings they're using. Is this not possible without installing other things?

@oupala
Copy link
Author

oupala commented Aug 11, 2018

As a novice user, I'm more than satisfied with the default set of plugins. I just want to tweak the settings they're using. Is this not possible without installing other things?

That's it. Due to some bugs and limitations, you cannot tweak configuration without installing some modules.

@charlesangus
Copy link

OK, thanks for the confirmation. I'm going to log an issue for that, because this dramatically reduces the utility/convenience of the linter. I don't have npm or nvm installed, so I would have to install one of those, then remark and remark-cli, then whatever packages I'm using, just to get back to the basic functionality that comes with the package...

@oupala
Copy link
Author

oupala commented Oct 25, 2018

Did something changed with Atom v32? My config that used to work until recently seems to not work anymore. The error is:

Error: Could not find module remark-lint-list-item-indent at addModule (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:242:27) at use (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:203:7) at addEach (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:186:13) at addPreset (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:164:9) at merge (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:150:5) at Config.create (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/configuration.js:105:5) at done (/home/user/.atom/packages/linter-markdown/node_modules/unified-engine/lib/find-up.js:148:20) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) 0:0

And note that the the package remark-lint-list-item-indent is already globally installed.

@wooorm
Copy link
Contributor

wooorm commented Oct 28, 2018

@oupala Have you tried uninstalling and re-installing?

@oupala
Copy link
Author

oupala commented Oct 28, 2018

Nope, I did not tried this.

But what would you reinstall? Which npm modules?

@wooorm
Copy link
Contributor

wooorm commented Nov 19, 2018

Oh sorry, I meant to uninstall the linter-remark plugin, and add it again. Maybe that helps.

@oupala
Copy link
Author

oupala commented Sep 16, 2019

Something must have changed somewhere because it does now work again while I have not modified anything...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants