Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not find module preset-lint-markdown-style-recommended #361

Closed
chrisgorgo opened this issue Oct 4, 2018 · 4 comments
Closed

Comments

@chrisgorgo
Copy link

Subject of the issue

Unable to use presets and plugins

Your environment

  • Windows 10 and Linux
  • remark-cli@5.0.0 remark-lint@6.0.2 remark-preset-lint-recommended@3.0.2
  • node@10.8.0 npm@6.4.1

Steps to reproduce

Following https://github.com/remarkjs/remark/tree/master/packages/remark-cli#usage

npm install -g remark-cli@5.0.0 remark-lint@6.0.2 remark-preset-lint-recommended@3.0.2
remark src/*.md src/*/*.md --use preset-lint-markdown-style-recommended

See: https://travis-ci.com/bids-standard/bids-specification/builds/86814507

Expected behaviour

Syntax validation output.

Actual behaviour

  1:1  error  Error: Could not find module `preset-lint-markdown-style-recommended`
    at addModule (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:232:35)
    at use (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:202:7)
    at addIn (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:196:7)
    at addPreset (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:167:9)
    at merge (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:151:5)
    at Config.create (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:109:3)
    at done (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/configuration.js:79:25)
    at apply (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/find-up.js:176:7)
    at applyAll (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/find-up.js:166:7)
    at found (/home/travis/.nvm/versions/node/v10.11.0/lib/node_modules/remark-cli/node_modules/unified-engine/lib/find-up.js:158:7)
@wooorm
Copy link
Member

wooorm commented Oct 4, 2018

Hmm, weird. It should work. Maybe Travis is being weird or changed something?
The easiest fix is to not install stuff globally. You can install these locally and it would work as well!
I suggest setting stuff up in a package.json as well, for example, take this one, because then you can run the same stuff locally as on travis.

@chrisgorgo
Copy link
Author

chrisgorgo commented Oct 4, 2018 via email

@wooorm
Copy link
Member

wooorm commented Oct 4, 2018

Sorry, you installed remark-preset-lint-recommended, but you’re using preset-lint-markdown-style-recommended (which does not exist). This is a typo, just make sure both match and you‘re fine 😉

@wooorm wooorm closed this as completed Oct 4, 2018
@chrisgorgo
Copy link
Author

chrisgorgo commented Oct 4, 2018 via email

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

No branches or pull requests

2 participants