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

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

Open
adewinter opened this issue Jul 21, 2021 · 13 comments
Assignees

Comments

@adewinter
Copy link

adewinter commented Jul 21, 2021

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
@lilruffian
Copy link

lilruffian commented Jul 22, 2021

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
Copy link

Same issue!

@aedifex
Copy link

aedifex commented Jul 27, 2021

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
Copy link
Member

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
Copy link

aedifex commented Jul 28, 2021

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

@SethFalco
Copy link
Member

SethFalco commented Jul 28, 2021

@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
Copy link

aedifex commented Jul 28, 2021

Thank you much @SethFalco, appreciate the thoughtful explanation.

@dsaw
Copy link

dsaw commented Jul 31, 2021

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

@rnzfan
Copy link

rnzfan commented Aug 10, 2021

Thank you, @SethFalco it works!

@RomanRcT
Copy link

RomanRcT commented Jan 9, 2022

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
Copy link

dantiston commented Feb 13, 2023

@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
Copy link
Member

why is this issue closed?

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

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

@SethFalco SethFalco reopened this Feb 14, 2023
@SethFalco SethFalco self-assigned this Feb 14, 2023
@dantiston
Copy link

Thanks, @SethFalco!

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

No branches or pull requests

9 participants