Skip to content Skip to sidebar Skip to footer

Reactjs - Phantomjs-node Issues With "fs" Module

I am trying to use phantomjs-node to capture screen. In my component i import const phantom = require('phantom');. Then after click i want to run method - printOnePage(){

Solution 1:

Looks like a webpack misconfiguration. An issue on the error suggests that a block

node: {
  fs: "empty"
}

needs to be added to the webpack config. Another remedy, it seems, could be to add an option

target: 'node',

to the webpack config.


Post a Comment for "Reactjs - Phantomjs-node Issues With "fs" Module"