Wednesday 10 May 2017

throw new TypeError('root path required')

i am deploying app to a remote server (dukko), and this error is thrown. any help or suggestion will be appreciated.

/app/node_modules/express/node_modules/serve-static/index.js:40
remote: throw new TypeError('root path required')
remote: ^
remote: TypeError: root path required
remote: at Function.serveStatic [as static] 
        (/app/node_modules/express/node_modules/serve-static/index.js:40:11)
remote: at exports.default (/app/server/config/express.js:129:57)
remote: at Object. (/app/server/app.js:51:28)
remote: at Module._compile (module.js:409:26)
remote: at Object.Module._extensions..js (module.js:416:10)
remote: at Module.load (module.js:343:32)
remote: at Function.Module._load (module.js:300:12)
remote: at Function.Module.runMain (module.js:441:10)
remote: at startup (node.js:140:18)
remote: at node.js:1043:3

the only static path i am using for are.

app.use(express.static(app.get('appPath')));
app.use('/jobseeker', express.static(process.env.JOBSEEKER_UPLOADS));
app.use('/employer', express.static(process.env.EMPLOYER_UPLOADS));`



via Umer MehAr

No comments:

Post a Comment