Library not working with @4.1.0 for some reason
Opened this issue · 1 comments
When visiting http://localhost:8000/admin it shows following error:
TypeError: path_to_regexp_1.pathToRegexp is not a function at /Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/@adminjs/express/src/authentication/protected-routes.handler.ts:59:7 at Array.find (<anonymous>) at Object.isAdminRoute (/Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/@adminjs/express/src/authentication/protected-routes.handler.ts:58:19) at /Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/@adminjs/express/src/authentication/protected-routes.handler.ts:22:16 at Layer.handle [as handle_request] (/Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express/lib/router/index.js:323:13) at /Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express/lib/router/index.js:341:12) at next (/Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express/lib/router/index.js:275:10) at /Users/yenliksharipkhanova/Documents/projects/yenbek/rest/node_modules/express-formidable/lib/middleware.js:36:7
The package.json:
{
"dependencies": {
"@adminjs/express": "^4.1.0",
"@adminjs/sequelize": "^2.1.5",
"@sentry/node": "^6.19.2",
"@sentry/tracing": "^6.19.2",
"@types/express-session": "^1.17.4",
"adminjs": "^5.9.9",
"aws-sdk": "^2.1111.0",
"bcrypt": "^5.0.1",
"body-parser": "^1.20.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"detect-libc": "^2.0.1",
"express": "^4.17.2",
"express-formidable": "^1.2.0",
"express-session": "^1.17.2",
"express-validator": "^6.14.0",
"file-type": "^17.1.1",
"firebase": "^9.6.5",
"firebase-admin": "^10.0.2",
"formidable": "^2.0.1",
"multiparty": "^4.2.3",
"node-gyp": "^9.0.0",
"pg": "^8.7.1",
"pg-hstore": "^2.3.4",
"reflect-metadata": "^0.1.13",
"sequelize": "^6.17.0",
"sequelize-typescript": "^2.1.3",
"sqlite3": "^5.0.2",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
"@types/compression": "^1.7.2",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
"@types/multiparty": "^0.0.33",
"@types/node": "^14.18.12",
"@types/uuid": "^8.3.4",
"@types/validator": "^13.7.1",
"@typescript-eslint/eslint-plugin": "^5.10.1",
"@typescript-eslint/parser": "^5.10.1",
"eslint": "^8.7.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"nodemon": "^2.0.15",
"prettier": "2.5.1",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.12.0",
"tslint": "^6.1.3",
"typescript": "^4.5.5"
}
}
After downgrading @adminjs/express to 4.0.1 it starts to work fine. Both 4.0.2, 4.0.3 not working.
Can you please help with this issue?
Are you using Typescript?