timeoff-management / timeoff-management-application

Simple yet powerful absence management software for small and medium size business (community edition)
https://TimeOff.Management
MIT License
926 stars 577 forks source link

os.tmpDir error when trying to import employees #495

Closed pwpbarney closed 2 years ago

pwpbarney commented 2 years ago

When I upload the csv and click "Import Employees" I get the following error:

TypeError: os.tmpDir is not a function
    at new IncomingForm (/app/timeoff-management/node_modules/formidable/lib/incoming_form.js:29:41)
    at /app/timeoff-management/lib/route/users/index.js:125:12
    at Layer.handle [as handle_request] (/app/timeoff-management/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/timeoff-management/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/app/timeoff-management/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/app/timeoff-management/node_modules/express/lib/router/layer.js:95:5)
    at /app/timeoff-management/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/app/timeoff-management/node_modules/express/lib/router/index.js:335:12)
    at next (/app/timeoff-management/node_modules/express/lib/router/index.js:275:10)
    at next (/app/timeoff-management/node_modules/express/lib/router/route.js:127:14)
    at module.exports (/app/timeoff-management/lib/middleware/ensure_user_is_admin.js:21:5)
    at Layer.handle [as handle_request] (/app/timeoff-management/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/timeoff-management/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/app/timeoff-management/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/app/timeoff-management/node_modules/express/lib/router/layer.js:95:5)
    at /app/timeoff-management/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/app/timeoff-management/node_modules/express/lib/router/index.js:335:12)
    at next (/app/timeoff-management/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/app/timeoff-management/node_modules/express/lib/router/index.js:174:3)
    at router (/app/timeoff-management/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/app/timeoff-management/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/app/timeoff-management/node_modules/express/lib/router/index.js:317:13)
    at /app/timeoff-management/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/app/timeoff-management/node_modules/express/lib/router/index.js:335:12)
    at next (/app/timeoff-management/node_modules/express/lib/router/index.js:275:10)
    at /app/timeoff-management/node_modules/express/lib/router/index.js:635:15
    at next (/app/timeoff-management/node_modules/express/lib/router/index.js:260:14)
    at Function.handle (/app/timeoff-management/node_modules/express/lib/router/index.js:174:3)

Apparently os.tmpDir() has been deprecated in favour of os.tmpdir() so can I just go though each file in the list and manually make the change? Or will that break something else?

pwpbarney commented 2 years ago

Fixed it by bumping formidable to version 1.1.1