jsonresume / resume-cli

CLI tool to easily setup a new resume 📑
https://jsonresume.org
MIT License
4.56k stars 388 forks source link

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

Open adewinter opened 3 years ago

adewinter commented 3 years ago

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:

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
lilruffian commented 3 years ago

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!

alsaedwy commented 3 years ago

Same issue!

aedifex commented 3 years ago

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.

SethFalco commented 3 years ago

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.

aedifex commented 3 years ago

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

SethFalco commented 3 years ago

@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
aedifex commented 3 years ago

Thank you much @SethFalco, appreciate the thoughtful explanation.

dsaw commented 3 years ago

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

rnzfan commented 3 years ago

Thank you, @SethFalco it works!

RomanRcT commented 2 years ago

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.

dantiston commented 1 year ago

@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?

SethFalco commented 1 year ago

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.

dantiston commented 1 year ago

Thanks, @SethFalco!