nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Paths are not relative after build.

Open bitbytebit1 opened this issue 1 year ago • 1 comments

Describe the feature

We are using unstorage with the filesystem driver. In our config we specify

storage: {
  '.data:cache': {
    driver: 'fs',
    base: './.data/cache',
  }
}

After our project is built the base path is absolute and points to the to the folder system that the project was built on. Instead of being relative to the nitro instance as one would expect. The folder paths are completely different on our production server and gitlab runner. One possible solution to this would be to use environment variables in our config to specify the absolute path but this feels a bit off. Thoughts? Solutions?

We are building in one environment and transferring the files so a relative path would make a lot more sense for us.

Additional information

  • [ ] Would you be willing to help implement this feature?

bitbytebit1 avatar Feb 26 '24 10:02 bitbytebit1

Thanks for the report ~~i will check it. BTW data is mounted by default and I expect it to be relative have you tried it?~~

pi0 avatar Feb 26 '24 10:02 pi0