Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

npx mrm lint-staged doesn't work on Windows #168

Closed
vvscode opened this issue May 4, 2021 · 4 comments
Closed

npx mrm lint-staged doesn't work on Windows #168

vvscode opened this issue May 4, 2021 · 4 comments
Labels

Comments

@vvscode
Copy link

vvscode commented May 4, 2021

$ npx mrm lint-staged
npx: installed 298 in 23.876s
C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\node_modules\mrm\bin\mrm.js:55
                throw err;
                ^
Error: Cannot find module 'C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\lib\node_modules\mrm-task-lint-staged'
Require stack:
- C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\node_modules\mrm\src\index.js
- C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\node_modules\mrm\bin\mrm.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\node_modules\mrm\src\index.js:163:18
    at new Promise (<anonymous>)
    at runTask (C:\Users\Elvira\AppData\Roaming\npm-cache\_npx\13864\node_modules\mrm\src\index.js:153:9)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Elvira\\AppData\\Roaming\\npm-cache\\_npx\\13864\\node_modules\\mrm\\src\\index.js',
    'C:\\Users\\Elvira\\AppData\\Roaming\\npm-cache\\_npx\\13864\\node_modules\\mrm\\bin\\mrm.js'
  ]
}
@vvscode
Copy link
Author

vvscode commented May 4, 2021

issue solved with a local installation of mrm and mrm-task-lint-staged

npm install mrm mrm-task-lint-staged --save-dev
npx mrm lint-staged
npm uninstall mrm mrm-task-lint-staged

but it's nice to have package-level fix

@akd-io
Copy link

akd-io commented Jun 30, 2021

Running into this as well. Would be nice to see a fix!
I also see lint-staged solved it in their docs by hard-coding and using mrm@2 instead:
lint-staged/lint-staged@4f9a146

Will be using mrm@2 myself until v3 is working ✌

akd-io added a commit to akd-io/prettier that referenced this issue Jun 30, 2021
Version 3 of mrm broke the `npx mrm lint-staged` command on Windows. You can follow the issue here: sapegin/mrm#168
@camilo86
Copy link

camilo86 commented Jul 1, 2021

issue solved with a local installation of mrm and mrm-task-lint-staged

npm install mrm mrm-task-lint-staged --save-dev
npx mrm lint-staged
npm uninstall mrm mrm-task-lint-staged

but it's nice to have package-level fix

Seeing the same issue, this worked for me ⬆️

@ghughes27
Copy link

My personal encounter with this error is due to the fact that I use nvm instead of a single source of node. The installation directory for nvm on Windows is C:\Program Files\nodejs. Haven't determined if this is something that I will have to configure locally with nvm or original installation of npm and the npx command, if that is indeed the case.

@sapegin sapegin added the bug label Sep 13, 2023
Repository owner locked and limited conversation to collaborators Sep 13, 2023
@sapegin sapegin converted this issue into discussion #326 Sep 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

5 participants