Can I use phantomJS on Azure app service for linux?












1















I'm getting a consistent error when trying to use the html-pdf package in my node application:



StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT



As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.










share|improve this question





























    1















    I'm getting a consistent error when trying to use the html-pdf package in my node application:



    StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT



    As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.










    share|improve this question



























      1












      1








      1








      I'm getting a consistent error when trying to use the html-pdf package in my node application:



      StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT



      As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.










      share|improve this question
















      I'm getting a consistent error when trying to use the html-pdf package in my node application:



      StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT



      As far as I can tell everything is installed correctly and the npm install works as expected. My suspicion is that there is some missing dependency in the built-in linux image, but I'm not sure how to confirm that.







      phantomjs azure-web-sites html-pdf node-html-pdf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 2 at 22:43







      Shaun Rowan

















      asked Jan 2 at 21:23









      Shaun RowanShaun Rowan

      4,45832147




      4,45832147
























          1 Answer
          1






          active

          oldest

          votes


















          0














          According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.




          Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.




          So the native package fontconfig or libfontconfig must have been installed in docker image first.



          For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.



          For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.






          share|improve this answer
























          • Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

            – Shaun Rowan
            Jan 4 at 15:44











          • Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

            – Shaun Rowan
            Jan 4 at 15:47












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54013360%2fcan-i-use-phantomjs-on-azure-app-service-for-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.




          Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.




          So the native package fontconfig or libfontconfig must have been installed in docker image first.



          For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.



          For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.






          share|improve this answer
























          • Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

            – Shaun Rowan
            Jan 4 at 15:44











          • Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

            – Shaun Rowan
            Jan 4 at 15:47
















          0














          According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.




          Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.




          So the native package fontconfig or libfontconfig must have been installed in docker image first.



          For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.



          For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.






          share|improve this answer
























          • Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

            – Shaun Rowan
            Jan 4 at 15:44











          • Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

            – Shaun Rowan
            Jan 4 at 15:47














          0












          0








          0







          According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.




          Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.




          So the native package fontconfig or libfontconfig must have been installed in docker image first.



          For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.



          For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.






          share|improve this answer













          According to the information comes from the Download PhantomJS page, there is two note for Linux Distributions as below.




          Note: For this static build, the binary is self-contained. There is no requirement to install Qt, WebKit, or any other libraries. It however still relies on Fontconfig (the package fontconfig or libfontconfig, depending on the distribution). The system must have GLIBCXX_3.4.9 and GLIBC_2.7.




          So the native package fontconfig or libfontconfig must have been installed in docker image first.



          For Debian/Ubuntu system, you can add RUN apt install fontconfig in the docker file, and check the package installed whether be exists via the command dpkg -l|grep fontconfig.



          For Fedora/CentOS system, add RUN yum install -y fontconfig, and check the installed on via yum list installed|grep fontconfig.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 8:05









          Peter PanPeter Pan

          12.3k3824




          12.3k3824













          • Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

            – Shaun Rowan
            Jan 4 at 15:44











          • Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

            – Shaun Rowan
            Jan 4 at 15:47



















          • Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

            – Shaun Rowan
            Jan 4 at 15:44











          • Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

            – Shaun Rowan
            Jan 4 at 15:47

















          Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

          – Shaun Rowan
          Jan 4 at 15:44





          Are there any resources outlining how to use a custom image with azure app service? How do I find out which type of system is being used? My assumption is the underlying docker file being used is github.com/Azure-App-Service/node/blob/master/8.11.4/Dockerfile

          – Shaun Rowan
          Jan 4 at 15:44













          Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

          – Shaun Rowan
          Jan 4 at 15:47





          Haven't really solved the issue, but marking as the correct answer since it aligns with my research as well. Not sure how great of a solution this can be long term. Microsoft installs a lot of the tooling as part of their image, so it seems like forking it is likely to cause a lot of maintenance headaches and portal incompatibilities in the future.

          – Shaun Rowan
          Jan 4 at 15:47




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54013360%2fcan-i-use-phantomjs-on-azure-app-service-for-linux%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith