Code Monkey home page Code Monkey logo

Comments (7)

nkanderson avatar nkanderson commented on August 16, 2024 3

@ddulic As a quick fix, I changed the $autoloadPath in bin/md2resume to the following:
$autoloadPath = $baseDir . '/vendor/autoload.php

There's a line with a ternary that assigns to $autoloadPath conditionally based on the name of the base directory, but in my case of installing via git clone, it does so incorrectly.

from markdown-resume.

asbjornu avatar asbjornu commented on August 16, 2024

I've dug around and found that the error message Please run composer install to install dependencies comes from bin/md2resume because it can't find the file /vendor/autoload.php.

I've checked and the file is there, but since I'm running markdown-resume from where it is installed with Composer (./vendor/bin/md2resume), the relative path to autoload.php is different. I'll see if I can figure out how to fix this in a PR.

from markdown-resume.

nkanderson avatar nkanderson commented on August 16, 2024

I've just run into this issue, getting the message The dependency '' was not found. Please run `composer install` to install dependencies. when trying to run the example command from the readme quickstart section, ./bin/md2resume html examples/source/sample.md examples/output/.

I installed via git clone, with the default directory name of "markdown-resume". As a result, the logic in PR #66 checking basename($baseDir) against the string markdown-resume returns true, and assigns a non-existent file (or rather, realpath returns false) for $autoloadPath.

I'd be happy to create a new PR, but could use a recommendation on how to ensure a proper autoload file location. If the current logic is good, but not specific enough, would it make sense to use dirname to check if md2resume is being run from within a vendor directory?

from markdown-resume.

nkanderson avatar nkanderson commented on August 16, 2024

@asbjornu should I open a new ticket for this issue, with the use case of installing via git clone? Or does it make sense to re-open this one?

from markdown-resume.

asbjornu avatar asbjornu commented on August 16, 2024

@nkanderson: Good question. What I would love was if we were able to concoct some tests for these scenarios so we don't break one use-case every time we fix another, whack-a-mole style. Perhaps @craig-davis has ideas for how we can add some automated tests for this?

from markdown-resume.

ddulic avatar ddulic commented on August 16, 2024

Same problem when trying to run from a docker container.
Anyone have any tips?

FROM php:7-cli
VOLUME /examples
ENV DEBIAN_FRONTEND noninteractive
RUN docker-php-ext-install mbstring
RUN apt-get update && apt-get -qqy install wget wkhtmltopdf git unzip xvfb
RUN wget https://github.com/there4/markdown-resume/archive/master.zip && unzip master.zip && mv markdown-resume-master markdown-resume
RUN cd markdown-resume && curl --silent --show-error https://getcomposer.org/installer | php \
    && ./composer.phar update && chmod +x ./bin/md2resume && ls -alh ./vendor/bin
CMD cd markdown-resume && xvfb-run ./bin/md2resume pdf --template readable /examples/source/ddulic.md /examples/output/
~/Projects/markdown-resume-master
❯ docker run --rm -t -i -e DISPLAY -v $PWD/examples:/examples:rw ddulic/resume

#46

from markdown-resume.

ddulic avatar ddulic commented on August 16, 2024

Thanks @nkanderson for the fix.
Did a fork and implemented it for my own needs.
It seems this problem also occurred even if I downloaded the zip but renamed the folder.

from markdown-resume.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.