question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: sslRedirect is not a function

See original GitHub issue

When upgrading from 0.0.4 to 0.1.1 my node server crashes and receives the error TypeError: sslRedirect is not a function. Downgraded back to 0.0.4 and works again.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

15reactions
marrcommented, Sep 3, 2020

@N00nDay It looks like the export was changed to be default (likely using ES6 modules). So you may be able to use the latest package, if you are using require instead of import, just: const sslRedirect = require('heroku-ssl-redirect').default That should fix things

4reactions
valentinolicommented, Nov 26, 2020

Workaround if you want to use ES modules:

import herokuSSLRedirect from 'heroku-ssl-redirect'
const sslRedirect = herokuSSLRedirect.default
Read more comments on GitHub >

github_iconTop Results From Across the Web

Express SSL redirect not working for root / - Stack Overflow
I had to create a custom route to server my SPA file, rename index.html so that Express would not try to serve it...
Read more >
heroku-ssl-redirect - npm
Redirect users to the SSL version of your app. For ExpressJS running on Heroku. This module works only with import, don't try to...
Read more >
Error TypeError is not a function in Node js | Edureka Community
I'm getting the error while running the following code in Node.js var assert = require('assert'); var request = require('request'); var ...
Read more >
heroku-ssl-redirect: Popularity and Maintenance Insights
heroku-ssl-redirect downloads and star history, commits and versions frequency, issues and pull request stats, maintainer info, and other insights.
Read more >
this.sessionModel.find is not a function when using express ...
That's usually a sign of attempting to load modules defined as ES6 exports. For example, to load the latest version of heroku-ssl-redirect in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found