-
Notifications
You must be signed in to change notification settings - Fork 40
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
Does not work in phantomjs: process is undefined #7
Comments
Got following error while generating pdf using Phantom-pdf package: Checking if phantomjs is installed in provided path: phantomjs F:/Projects/Javandi/node_modules/path/path.js:25 does not works with phantomjs??? could anybody help me how to fix this error??? |
Workaround: Before you window.process = {}; This will create a (dummy) variable |
This is also a problem for anyone using Angular 6 with this library. Below is the line that I am seeing that fails in Angular 6. Below is a link to Angular saying that they remove the nodejs shims |
@lancewf we're you able to find a solution for this? |
define process.env in vite.config.js file export default defineConfig({
plugins: [
vue()
],
define: {
'process.env': {}
}
}) |
This module implicitly depends on
process
, which isn't defined outside of Node. Prior to a2f87c3, this module had an extravar process = process || {};
in path.js that allowed the use of functions that don't meaningfully rely onprocess
.And since it sounds like people shouldn't be using this module in Node itself (#6), this problem might affect most legitimate users of this module.
See philc/vimium@da57280 for an example of a legitimate use of this library that was broken by the removal of
var process = process || {};
.The text was updated successfully, but these errors were encountered: