Yoctol / bottender

⚡️ A framework for building conversational user interfaces.
https://bottender.js.org
MIT License
4.21k stars 334 forks source link

unhandled promise rejection if session driver set "file" on a read-only system #631

Open Aqzhyi opened 4 years ago

Aqzhyi commented 4 years ago

Describe the bug

unhandled promise rejection if session driver set "file" on a read-only system such as free plan on ZEIT Now

Unlike local development, there are always restrictions on cloud deployment, especially for free accounts

To Reproduce

  1. bottender.config.js set 'file' as session.driver
  2. $ now
  3. See zeit.co the Runtime tab.

Expected behaviour

A clear and concise description of what you expected to happen.

expect errorMessage to like "You haven't permission to create files"

Screenshots

image

Additional context

chentsulin commented 4 years ago

Hi @hilezi, IMO, there is not much different between errorMessage: Error: EROFS: read-only file system, mkdir.... and You haven't permission to create files.

You could use cloud redis, cloud mongo, or other custom session store that works on distributed or serverless system.