Compile to HTML throws error (PhantomJS)
See original GitHub issueI’m trying to include this plugin into an existing project. In the prod configuration I added
new PrerenderSpaPlugin(
// Absolute path to compiled SPA
path.join(__dirname, '../dist'),
// List of routes to prerender
['/coins']
),
I then try to npm run build
and it crashes like so
⠸ building for production.../Users/loschcode/Desktop/work/projects/bloodbath/app/node_modules/prerender-spa-plugin/lib/compile-to-html.js:82
if (error) throw error
^
Error: Command failed: /usr/local/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /Users/loschcode/Desktop/work/projects/bloodbath/app/node_modules/prerender-spa-plugin/lib/phantom-page-render.js http://localhost:8001/coins {}
at ChildProcess.exithandler (child_process.js:272:12)
at ChildProcess.emit (events.js:160:13)
at maybeClose (internal/child_process.js:943:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bloodbath-app@1.0.0 build: `node build/build.js`
npm ERR! Exit status 1
I investigated the file and it looks like PhantomJS crashes for some reason, but it’s hard to be sure, what could be the reason of this problem ?
PS : The only similar issue I spotted on the Internet is in Chinese and was posted a few days ago, maybe a problem linked some changes in a package ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
How do I capture JavaScript errors generated in a page ...
It loads an HTML page, inserts a script and then runs some code in the page context (here with a line throwing a...
Read more >PhantomJS - Quick Guide - Tutorialspoint
It will throw an error, if the source or destination file does not exist. 5, exists. It checks whether the given file path...
Read more >Re: write EPIPE error on generating html to pdf
Hi Team,. I'm trying to generate html to pdf using html-pdf npm. Please check below code const invoicePath = path.resolve(path.join(__dirname, '../../.
Read more >Troubleshooting - PhantomJS
To easily catch an error occured in a web page, whether it is a syntax error or other thrown exception, an onError handler...
Read more >How to use the phantom.create function in phantom - Snyk
To help you get started, we've selected a few phantom.create examples, ... S+/); if (!urlMatch) throw new Error("This command needs an URL as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ooh, that might be a bug. I’ll take a look today.
@Loschcode Perhaps the official puppeteer docker guide might help?
Doesn’t appear to be on our end anymore.