You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JWT version: 9.0.1
error: Cannot find module './lodash'
I have tried every possible debugging from my end,
it's properly installed in my project, after a few tests when it does not work, I imported lodash, also i have removed node_modules, and reinstalled all packages. but the issue is not fixed.
please help me with it.
const jwt = require('jsonwebtoken');
whenever i require this on my project it shows the error.
node:internal/modules/cjs/loader:1093
throw err;
^
Error: Cannot find module './lodash'
Require stack:
- C:\Users\Dina\Projects\realProject\devProject\src\node_modules\lodash\index.js
- C:\Users\Dina\Projects\realProject\devProject\src\node_modules\jsonwebtoken\sign.js
- C:\Users\Dina\Projects\realProject\devProject\src\node_modules\jsonwebtoken\index.js
- C:\Users\Dina\Projects\realProject\devProject\src\controllers\userController.js
- C:\Users\Dina\Projects\realProject\devProject\src\routes\api\userRoutes.js
- C:\Users\Dina\Projects\realProject\devProject\server.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
at Module._load (node:internal/modules/cjs/loader:934:27)
at Module.require (node:internal/modules/cjs/loader:1157:19)
at require (node:internal/modules/helpers:119:18)
at Object.<anonymous> (C:\Users\Dina\Projects\realProject\devProject\src\node_modules\lodash\index.js:1:18)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\src\\node_modules\\lodash\\index.js',
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\src\\node_modules\\jsonwebtoken\\sign.js',
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\src\\node_modules\\jsonwebtoken\\index.js',
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\src\\controllers\\userController.js',
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\src\\routes\\api\\userRoutes.js',
'C:\\Users\\Dina\\Projects\\realProject\\devProject\\server.js'
]
}
Node.js v19.9.0
The text was updated successfully, but these errors were encountered:
Could you use the latest version and see if you are still having issues? If not could you provide the version in which you are using in your package.json and provide context in how you are using jsonwebtoken - thanks.
JWT version: 9.0.1
error: Cannot find module './lodash'
I have tried every possible debugging from my end,
it's properly installed in my project, after a few tests when it does not work, I imported
lodash
, also i have removed node_modules, and reinstalled all packages. but the issue is not fixed.please help me with it.
const jwt = require('jsonwebtoken');
whenever i require this on my project it shows the error.
The text was updated successfully, but these errors were encountered: