resume-cli icon indicating copy to clipboard operation
resume-cli copied to clipboard

theme path jsonresume-theme-even could not be resolved from current working directory

Open adewinter opened this issue 4 years ago • 13 comments

When I follow the "Getting Started" instructions on the homepage the following error occurs:

PS C:\Users\adewi\Desktop> resume export resume.pdf
Error: theme path jsonresume-theme-even could not be resolved from current working directory
    at _default (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\render-html.js:46:11)
    at C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:107:48
    at createPdf (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:131:5)
    at module.exports (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:44:5)
    at Command.<anonymous> (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\main.js:67:5)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\main.js:79:3 `createPdf` errored out

Done! Find your new .pdf resume at:
 C:\Users\adewi\Desktop\resume.pdf

Despite claiming that a PDF has been generated in the last two lines, this is not the case. I'm not sure how to go about fixing the problem. There does not seem to be any documentation on jsonresume.org that indicates how themes work or how to use them for exporting a PDF.

Any advice on how to fix this issue would be appreciated!

Thanks, Anton

Steps to recreate:

Platform: Windows 10/Powershell Commands:

  • npm install -g resume-cli
  • ensure "resume.json" is valid and located in the cwd
  • run resume export resume.pdf

Expected results: A PDF of my resume in the default theme

Actual results: Error message:

PS C:\Users\adewi\Desktop> resume export resume.pdf
Error: theme path jsonresume-theme-even could not be resolved from current working directory
    at _default (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\render-html.js:46:11)
    at C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:107:48
    at createPdf (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:131:5)
    at module.exports (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\export-resume.js:44:5)
    at Command.<anonymous> (C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\main.js:67:5)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)
    at async C:\Users\adewi\AppData\Roaming\nvm\v16.4.2\node_modules\resume-cli\build\main.js:79:3 `createPdf` errored out

Done! Find your new .pdf resume at:
 C:\Users\adewi\Desktop\resume.pdf

adewinter avatar Jul 21 '21 20:07 adewinter

I have the same problem on macOS 11.4. I'm excited to use this tool and really hope there's a fix on the horizon!

lilruffian avatar Jul 22 '21 23:07 lilruffian

Same issue!

alsaedwy avatar Jul 23 '21 21:07 alsaedwy

Also encountering the issue on macOS 11.4. I've been poking around the codebase some...hoping for a straightforward fix! I'll throw up a PR if I can make some progress.

aedifex avatar Jul 27 '21 21:07 aedifex

Just tested, seems this occurs when using resume-cli installed globally. (ie npm i -g resume-cli) It appears to work as intended when using resume-cli installed in the current project/directory. (ie npm i resume-cli)

Not ideal, but is a valid workaround for now.

SethFalco avatar Jul 28 '21 00:07 SethFalco

@SethFalco this is admittedly a silly question but how do you get the CLI to run when you've installed it locally?

aedifex avatar Jul 28 '21 04:07 aedifex

@aedifex Not a silly question at all.

When you install resume-cli locally to the directory, you'll get a new directory called node_modules/.bin, which contains tools your dependencies came with. You can use npm/npx to execute them.


You could add the command to your scripts array in package.json. npm run will execute binaries in the node_modules/.bin directory in your project/directory.

{
  "scripts": {
    "build:pdf": "resume export resume.pdf"
  },
  "devDependencies": {
    "resume-cli": "^3.0.5"
  }
}
npm run build:pdf

Alternatively, you can just use npx (npm package executor), which is bundled with NPM. NPX lets you execute binaries in your node_modules/.bin directory in your project/directory.

npx resume export resume.pdf

SethFalco avatar Jul 28 '21 07:07 SethFalco

Thank you much @SethFalco, appreciate the thoughtful explanation.

aedifex avatar Jul 28 '21 18:07 aedifex

same issue for me..would prefer a use case where a new javascript repository is not needed.

dsaw avatar Jul 31 '21 18:07 dsaw

Thank you, @SethFalco it works!

rnzfan avatar Aug 10 '21 01:08 rnzfan

npx resume export r.pdf Error: theme path jsonresume-theme-even could not be resolved from current working directory at _default (/usr/local/lib/node_modules/resume-cli/build/render-html.js:46:11) at /usr/local/lib/node_modules/resume-cli/build/export-resume.js:107:48 at createPdf (/usr/local/lib/node_modules/resume-cli/build/export-resume.js:131:5) at module.exports (/usr/local/lib/node_modules/resume-cli/build/export-resume.js:44:5) at Command. (/usr/local/lib/node_modules/resume-cli/build/main.js:67:5) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 0) at async /usr/local/lib/node_modules/resume-cli/build/main.js:79:3 createPdf errored out

Done! Find your new .pdf resume at: /home/roman/cv/r.pdf

This is doesn't work for me.

RomanRcT avatar Jan 09 '22 11:01 RomanRcT

@adewinter @SethFalco why is this issue closed? As of January 2023 (1.5 years after this issue was initially posted), the website's "Getting Started" page still has instructions to use:

npm install -g resume-cli resume export resume.html

But this error still occurs. If this is expected behavior, maybe the website should be changed? Or if it's not expected behavior, this bug can be fixed?

dantiston avatar Feb 13 '23 18:02 dantiston

why is this issue closed?

It was closed because the author of this issue opted to close it. :shrug:

Meanwhile, I do agree this issue shouldn't be considered resolved. I'll reopen it for now and assign it to myself.

SethFalco avatar Feb 14 '23 21:02 SethFalco

Thanks, @SethFalco!

dantiston avatar Feb 18 '23 16:02 dantiston