GithubHelp home page GithubHelp logo

Cannot find module 'iconv' about fill-pdf HOT 7 CLOSED

uditalias avatar uditalias commented on July 23, 2024
Cannot find module 'iconv'

from fill-pdf.

Comments (7)

AdamBrodzinski avatar AdamBrodzinski commented on July 23, 2024

+1 and also 'temp'

from fill-pdf.

dommmel avatar dommmel commented on July 23, 2024

Afaics both deps (iconv + temp) are there: https://github.com/dommmel/fill-pdf/blob/master/package.json#L26-L27

from fill-pdf.

AdamBrodzinski avatar AdamBrodzinski commented on July 23, 2024

I'm not sure why they're not showing up in the package.json that gets downloaded (v0.0.2) but the file looks different than what's on master.

npm install fill-pdf
[email protected] node_modules/fill-pdf

pdfmaker|⇒ node app.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'iconv'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/adam/projects/sandbox/pdfmaker/node_modules/fill-pdf/index.js:2:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
pdfmaker|⇒ cat node_modules/fill-pdf/package.json
{
  "name": "fill-pdf",
  "version": "0.0.2",
  "description": "Fill out pdf forms",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/dommmel/fill-pdf"
  },
  "keywords": [
    "pdf",
    "fdf",
    "utf8"
  ],
  "author": {
    "name": "Dominik Heier",
    "email": "[email protected]",
    "url": "http://www.flexify.net/"
  },
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/dommmel/fill-pdf/issues"
  },
  "homepage": "https://github.com/dommmel/fill-pdf",
  "_id": "[email protected]",
  "dist": {
    "shasum": "21e1fb0484a14572a3fe008bce9cafc542e0a68b",
    "tarball": "http://registry.npmjs.org/fill-pdf/-/fill-pdf-0.0.2.tgz"
  },
  "_from": "fill-pdf@*",
  "_npmVersion": "1.3.24",
  "_npmUser": {
    "name": "dommmmel",
    "email": "[email protected]"
  },
  "maintainers": [
    {
      "name": "dommmmel",
      "email": "[email protected]"
    }
  ],
  "directories": {},
  "_shasum": "21e1fb0484a14572a3fe008bce9cafc542e0a68b",
  "_resolved": "https://registry.npmjs.org/fill-pdf/-/fill-pdf-0.0.2.tgz",
  "readme": "ERROR: No README data found!"
}

After adding in deps it works (pdf wasn't there so it errors but now runs)

pdfmaker|⇒ npm install --save iconv
-
> [email protected] install /Users/adam/projects/sandbox/pdfmaker/node_modules/iconv
> node-gyp rebuild

  CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o
  LIBTOOL-STATIC Release/iconv.a
  CXX(target) Release/obj.target/iconv/src/binding.o
  SOLINK_MODULE(target) Release/iconv.node
  SOLINK_MODULE(target) Release/iconv.node: Finished
[email protected] node_modules/iconv
└── [email protected]

pdfmaker|⇒ npm install --save temp

[email protected] node_modules/temp
└── [email protected]

pdfmaker|⇒ node app.js
# this error is expected, pdf really isn't there
stderr: Error: Unable to find file.

from fill-pdf.

jspizziri avatar jspizziri commented on July 23, 2024

+1

@dommmel the package deps are in the repo, but the npm package is out of date. Please tag your releases and republish to npm.

from fill-pdf.

jspizziri avatar jspizziri commented on July 23, 2024

@AdamBrodzinski & @uditalias,

Until the package gets update you can install it directly from github via:

npm install git+https://github.com/dommmel/fill-pdf.git --save

from fill-pdf.

jspizziri avatar jspizziri commented on July 23, 2024

@dommmel,

Also your packages are out of date, there was an issue with iconv bnoordhuis/node-iconv#124 which is causing a build error.

from fill-pdf.

dommmel avatar dommmel commented on July 23, 2024

I just merged #8 and republished. Let me know if that resolves your issues.

from fill-pdf.

Related Issues (20)

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.