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

markus --help leads to Cannot find module 'mkdirp' on fresh install on mac #501

Closed
martinratinaud opened this issue May 4, 2022 · 2 comments · Fixed by #504
Closed

markus --help leads to Cannot find module 'mkdirp' on fresh install on mac #501

martinratinaud opened this issue May 4, 2022 · 2 comments · Fixed by #504
Assignees
Labels
Type: Bug 🐛 Something isn't working

Comments

@martinratinaud
Copy link

Bug Report 🐛

Installing in a nodeJS v16.13.1 or a v14.19.1 environment on a Macbook Air M1 with the following command

npm install -g @accordproject/markdown-cli

And launching

markus --help

Expected Behavior

Help should be displayed

Current Behavior

command fails with

markus --help
node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module 'mkdirp'
Require stack:
- /Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-util/lib/filewriter.js
- /Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-util/index.js
- /Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-util/lib/filewriter.js:18:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-util/lib/filewriter.js',
    '/Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/node_modules/@accordproject/concerto-util/index.js',
    '/Users/martin/.nvm/versions/node/v16.13.1/lib/node_modules/@accordproject/markdown-cli/index.js'
  ]
}

Possible Solution

mkdirp is listed as a dev dependency, maybe it should be a dependency only

Steps to Reproduce

nvm use v16.13.1
npm install -g @accordproject/markdown-cli
markus --help

Context (Environment)

I'm working on the Open Terms Archive and we use this Accord Project to transform digital services documents into markdown in order to track changes overtime.
For this particular document https://www.decathlon.fr/static/2019/LP/services/global-services/V21/assets/cgv.pdf, whitespaces are not correctly set (leading to weird decoding like Centre de relation clientsVousavezunequestionouvoussouhaiteznousfairepartd'uneréclamationéventuelle?NotreServiceClientsestàvotre écoute)
I thus updated from 0.14.1 to 0.15.1 to see if it solved the problem but ended up on this error

Desktop

  • OS: macOS
  • NodeJs
  • Version: v16.13.1 or v14.19.1
@martinratinaud martinratinaud changed the title markus --help leads to Cannot find module 'mkdirp' on fresh install on mac markus --help leads to Cannot find module 'mkdirp' on fresh install on mac May 4, 2022
@mttrbrts mttrbrts added the Type: Bug 🐛 Something isn't working label May 10, 2022
@dselman
Copy link
Contributor

dselman commented May 10, 2022

Verified that this works with these commands (installing version 0.15.2):

npm i -g @accordproject/markdown-cli
markus --help

@martinratinaud
Copy link
Author

Works like a charm, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants