1

I've encountered following error when I run my code,

Error: /var/www/courses.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: 1: /var/www/mysite.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: Syntax error: Unterminated quoted string

    at Socket.onStderr (/var/www/mysite.com.mm/node_modules/phridge/lib/spawn.js:93:28)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:547:20)

Please let me know how to solve it. Thanks.

2 Answers 2

1

This happens when we build in local and push to host phantomjs.

## base image
FROM node:10.16

ADD ./Resources/node_modules /tmp/node_modules

RUN mkdir /usr/src/app
WORKDIR /usr/src/app

ENTRYPOINT ["/usr/src/app/entrypoint.sh"]

Now Build and exec Docker then go to Docker Terminal and remove all node modules and do npm install inside docker

Sign up to request clarification or add additional context in comments.

Comments

1

See the following issues on GitHub:

It seems you have installed the binary on 1 platform and run them on another. According to docs NPM expects you to run npm rebuild if you switch platforms, to rebuild any platform-specific dependencies.

see also https://github.com/Medium/phantomjs#cross-platform-repositories for more information.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.