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

Example does not work: ReferenceError #59

Open
kklepper opened this issue May 16, 2021 · 0 comments
Open

Example does not work: ReferenceError #59

kklepper opened this issue May 16, 2021 · 0 comments

Comments

@kklepper
Copy link

Hello, as far as I can see your example should work out of the box, but it doesn't.

What did I do?

I put example.js to the root directory, made a subdirectory output from there and started your instruction:

# echo example.js | docker run -i --rm --security-opt seccomp=$HOME/chrome.json \
>     --mount type=bind,source="$(pwd)"/output,target=/output \
>     --name puppeteer-headless \
>     justinribeiro/puppeteer-headless \
>     node -e "`cat $_`"
[eval]:1
example.js
^

ReferenceError: example is not defined
    at [eval]:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:50:33)
    at Object.runInThisContext (vm.js:139:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:653:30)
    at evalScript (bootstrap_node.js:479:27)
    at startup (bootstrap_node.js:180:9)
    at bootstrap_node.js:625:3

Unfortunately, I cannot debug this by myself. What am I doing wrong? Can you help me?

Explanation

I have a docker puppeteer container with node myself and it works, I am just curious to test with your container as I stumbled upon a recommendation somewhere.

My container use has to be throttled somewhat as CPU tends to rise when too many parallel requests are running. I suppose this is perfectly normal, but maybe your solution works better.

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

1 participant