Giter Club home page Giter Club logo

Comments (5)

gcmeen avatar gcmeen commented on August 20, 2024

Got following error while generating pdf using Phantom-pdf package:

Checking if phantomjs is installed in provided path: phantomjs
ReferenceError: Can't find variable: process

F:/Projects/Javandi/node_modules/path/path.js:25
F:/Projects/Javandi/node_modules/path/path.js:629

does not works with phantomjs??? could anybody help me how to fix this error???

from path.

Download avatar Download commented on August 20, 2024

Workaround:

Before you require('path'), do:

window.process = {};

This will create a (dummy) variable process so the error goes away.

from path.

lancewf avatar lancewf commented on August 20, 2024

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.
https://github.com/jinder/path/blob/master/path.js#L25

Below is a link to Angular saying that they remove the nodejs shims
angular/angular-cli#9827 (comment)

from path.

japo32 avatar japo32 commented on August 20, 2024

@lancewf we're you able to find a solution for this?

from path.

gongzhxu avatar gongzhxu commented on August 20, 2024

define process.env in vite.config.js file

export default defineConfig({
  plugins: [
    vue()
  ],
  define: {
    'process.env': {}
  }
})

from path.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.