Auth0 by Okta Integration with Javascript functions

Excited about Auth0 integration as shown at

however the function code is written in typescript and was wondering if you have an example written in javascript. i have over 10 projects with functions in javascript
looking for path to quickly implement feature

specifically the example uses import statements that i haven’t been able to get working in javascript

import { Handler } from "@netlify/functions";
import { wrap } from "@netlify/integrations";
import { withPlanetscale } from "@netlify/planetscale";
import { withAuth0 } from "@netlify/auth0";

@Ade Those import statements are JavaScript.


See also:

A package.json "type" value of "module" tells Node.js to interpret .js files within that package as using ES module syntax.

1 Like

@nathanmartin i should have clarified
i am using another packages the breaks when set the type to module
I get the following error

✘ [ERROR] Could not resolve "superagent-proxy"

      38 │     require('superagent-proxy')(request);

guess the question was can i import these libraries without changing the type

issues appears to be linked in library that depends on rest-facade

this issue provided a solution seems to handle the error.