Open Ex-Ark opened 3 years ago
Thanks for your report and investigation @Ex-Ark. I just put up a PR that should fix the issue. It also includes tests to ensure that this doesn't happen again :) https://github.com/jsonresume/resume-cli/pull/494
Having the same problem, however, using an absolute path also doesn't work for me, getting the following output
resume export --theme /home/user/Repositories/cv/resume-json --resume resume.json --format html
Please enter a export destination.
After adding resume naming
resume export --theme /home/user/Repositories/cv/resume-json --resume resume.json --format html resume123
Gives back
(node:309968) UnhandledPromiseRejectionWarning: Error: theme path jsonresume-theme-/home/user/Repositories/cv/resume-json could not be resolved from current working directory
at _default (/home/user/.nvm/versions/node/v11.15.0/lib/node_modules/resume-cli/build/render-html.js:43:11)
at createHtml (/home/user/.nvm/versions/node/v11.15.0/lib/node_modules/resume-cli/build/export-resume.js:84:46)
at module.exports (/home/user/.nvm/versions/node/v11.15.0/lib/node_modules/resume-cli/build/export-resume.js:36:5)
at Command.program.command.description.action (/home/user/.nvm/versions/node/v11.15.0/lib/node_modules/resume-cli/build/main.js:67:5)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:309968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:309968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Current working directory is identical to the error output above
pwd
/home/user/Repositories/cv/resume-json
Using this version the CLI
resume --version
3.0.4
The theme in the folder is identical to the boilerplate theme, just started developing a custom theme.
Not sure what's left to try, hopefully the PR gets merged soon
What's the last functioning version to export a local theme that's still in development, and what command would I use? I reproduced the same error on 3.0.3, and 3.0.2/3.0.1/3.0.0 are giving me different errors. Or I guess I'll have to be patient for now.
I too am facing the same problem. This problem is not visible on 3.0.0. I haven't tested it on 3.0.3, and 3.0.2/3.0.1. Should I test it and post my findings?
Any update on this?
Still an issue on 3.0.4, freshly installed just now. Using an absolute path also fails as @hyperfocus1337 has found:
Error: theme path jsonresume-theme-/home/davidjb/resume/theme could not be resolved from current working directory
Still an issue for me as well, but the proposed fix #494 is still pending They probably won't release a minor just for this fix, guess we'll have to wait more changes
To be clear
Using an absolute path also fails
My absolute path works only for the export --format html
command, I too cannot use relative theme nor absolute theme with serve
command
Applying the patch from #494 resolves the issue for me. Using Yarn’s patch protocol is one way of avoiding needing an official release, e.g. https://github.com/davidjb/cv/blob/master/package.json#L28
Env
node v14.15.4 resume-cli v3.0.4
Error
Expected behaviour
Providing relative local theme path (i.e
resume export --theme .
resume export --theme ../json-resume-theme-kendall/
should not raise error from within resume-cli lib.Full error stack
Hints
Due to recent changes (#469) when providing theme using
.
the path is not initialized inside render-html.jssee my comment on the changes directly
Temp fix
if you pass the theme without using relative path then it no longer crashes because
path.join
is not called on undefined object.with absolute path instead :