Open ofu997 opened 1 year ago
I'm importing using
var jwt = require('jsonwebtoken')
and my page will not load, showing the below image
version: ^9.0.0 React JS: ^17.0.2 Node: 18.12.1
I have the same issue
This works for me
import * as jwt from 'jsonwebtoken';
Or
import { sign, verify } from 'jsonwebtoken';
@skarjalainen what is your nodejs version ?
This works for me
import * as jwt from 'jsonwebtoken';
Or
import { sign, verify } from 'jsonwebtoken';
None of this works for me. This one worked for me:
import jwt from 'jsonwebtoken'
Tested in 8.5.1 and latest 9.0.0
I'm importing using
var jwt = require('jsonwebtoken')
and my page will not load, showing the below image
version: ^9.0.0 React JS: ^17.0.2 Node: 18.12.1
I'm not sure if jsonwebtoken supports commonjs modules. I would just try import jwt from 'jsonwebtoken'
instead.
For me none working in my React project. Can someone pls help
import jwt from 'jsonwebtoken' import * as jwt from 'jsonwebtoken'; import { sign, verify } from 'jsonwebtoken';
I'm importing using
var jwt = require('jsonwebtoken')
and my page will not load, showing the below imageversion: ^9.0.0 React JS: ^17.0.2 Node: 18.12.1