schwarzdavid / bootstrap-email

MIT License
27 stars 11 forks source link

TypeError: cheerio is not a function #14

Closed ru4ert closed 3 years ago

ru4ert commented 3 years ago
TypeError: cheerio is not a function
    at Function.wrapContent (c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\node_modules\bootstrap-email\src\lib\ElementHelper.js:48:20)
    at ContentCompiler.body (c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\node_modules\bootstrap-email\src\lib\ContentCompiler.js:265:17)
    at BootstrapEmail._compileHtml (c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\node_modules\bootstrap-email\src\BootstrapEmail.js:235:20)
    at BootstrapEmail.compile (c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\node_modules\bootstrap-email\src\BootstrapEmail.js:190:8)
    at BootstrapEmail.compileAndSave (c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\node_modules\bootstrap-email\src\BootstrapEmail.js:203:24)
    at c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\ts-build\src\assets\_emails\index.js:15:23
    at Array.forEach (<anonymous>)
    at c:\Users\ruper\Documents\Code\ReactTypescript\abcteam\abcteam_library_backend\ts-build\src\assets\_emails\index.js:11:122
    at FSReqCallback.oncomplete (fs.js:180:23)
ru4ert commented 3 years ago

Solution:

Dependencies

"bootstrap-email": {
      "version": "1.1.1",
      "resolved": "https://registry.npmjs.org/bootstrap-email/-/bootstrap-email-1.1.1.tgz",
      "integrity": "sha512-8O2OMPKR6nz0m1q3P7XXgMuKb6IMfi6RBmWWa9zG7T+e8h9+hMP22WLmqApmwusNkakRVov/cvBFXUmrLe5WHg==",
      "requires": {
        "bunyan": "^1.8.12",
        "cheerio": "^1.0.0-rc.3",
        "ejs": "^2.6.1",
        "juice": "^5.2.0",
        "node-sass": "^4.14.1",
        "postcss": "^7.0.25",
        "sass-extract": "^2.1.0"
      }
    },

"cheerio": "^1.0.0-rc.3",

Note We are currently working on the 1.0.0 release of cheerio on the main branch. The source code for the last published version, 0.22.0, can be found here.

Source: https://www.npmjs.com/package/cheerio

schwarzdavid commented 3 years ago

There is already a pull request for this. I will look at it today and merge