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

docs: mrm-task-lint-staged has to be installed #970

Open
kaminskypavel opened this issue May 1, 2021 · 4 comments · Fixed by #976
Open

docs: mrm-task-lint-staged has to be installed #970

kaminskypavel opened this issue May 1, 2021 · 4 comments · Fixed by #976

Comments

@kaminskypavel
Copy link

Description

the readme suggest to run npx mrm lint-staged
but his will fail

$ npx mrm lint-staged
C:\Users\kamin\AppData\Local\npm-cache\_npx\3547fb6ad2b19488\node_modules\mrm\bin\mrm.js:55
                throw err;
                ^

Error: Cannot find module 'C:\Users\kamin\AppData\Local\npm-cache\_npx\5376\lib\node_modules\mrm-task-lint-staged'
Require stack:
- C:\Users\kamin\AppData\Local\npm-cache\_npx\3547fb6ad2b19488\node_modules\mrm\src\index.js
- C:\Users\kamin\AppData\Local\npm-cache\_npx\3547fb6ad2b19488\node_modules\mrm\bin\mrm.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15)
    at Function.Module._load (node:internal/modules/cjs/loader:768:27)
    at Module.require (node:internal/modules/cjs/loader:995:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at C:\Users\kamin\AppData\Local\npm-cache\_npx\3547fb6ad2b19488\node_modules\mrm\src\index.js:163:18
    at new Promise (<anonymous>)
    at runTask (C:\Users\kamin\AppData\Local\npm-cache\_npx\3547fb6ad2b19488\node_modules\mrm\src\index.js:153:9)
    at processTicksAndRejections (node:internal/process/task_queues:94:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\kamin\\AppData\\Local\\npm-cache\\_npx\\3547fb6ad2b19488\\node_modules\\mrm\\src\\index.js',
    'C:\\Users\\kamin\\AppData\\Local\\npm-cache\\_npx\\3547fb6ad2b19488\\node_modules\\mrm\\bin\\mrm.js'
  ]
}
npm ERR! code 1
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c mrm lint-staged

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kamin\AppData\Local\npm-cache\_logs\2021-05-01T09_48_21_800Z-debug.log

mrm's install guide states :

npm install -g mrm mrm-task-lint-staged
mrm lint-staged

has to be present first.

Steps to reproduce

Debug Logs

expand to view
COPY THE DEBUG LOGS HERE

Environment

  • OS:
  • Node.js:
  • lint-staged:
@jimyhdolores
Copy link

jimyhdolores commented May 3, 2021

Hello @kaminskypavel I write to you from google translator
: v had the same problem, the problem itself is the lack of communication from the documentation; Anyway, you need to install mrm globally on your system

npm install -g mrm

then add the taks offered by mrm in this case for lint-staged, to install both in one shot run

npm install -g mrm mrm-task-lint -staged

once you have that now if you can run in your project

 npx mrm lint-staged

I hope this helps you and others too, successes in everything
more info https://mrm.js.org/docs/mrm-task-lint-staged

@lucasff
Copy link

lucasff commented May 4, 2021

I'm getting

Preset “default” not found.
We’ve tried to load “mrm-preset-default” and “default” npm packages.

when I run npx mrm lint-staged

@jimyhdolores
Copy link

jimyhdolores commented May 5, 2021

Hello @lucasff , try downgrading the mrm version

@iiroj iiroj linked a pull request May 11, 2021 that will close this issue
@iiroj
Copy link
Member

iiroj commented May 11, 2021

The PR #976 does not fix the root cause of the issue, but I linked it anyway because it at least means our README will produce working results.

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

Successfully merging a pull request may close this issue.

4 participants