I know what I’m doing is unsupported, but maybe someone has ideas on how to make it work anyway?
I have server-side Dart working fine but to get client-side Dart compiled (or even to just use shared packages on the server) I need
pub packages working (
pub is Dart’s equiv of
Packages are restored by calling
pub get. I can call this from the
install hook in
package.json and it seems to work fine (output shows it download packages and no errors). By default these packages go into
/app here). However if I list that folder immediately after, it appears empty:
dart-sdk/bin/pub get && ls -la /app/.pub-cache
This is sorta confusing… it’s like /app/.pub-cache is some magic black hole (or Dart failed to report it couldn’t write here, or it put these files elsewhere, both of which are possible, but unexpected… even
--verbose doesn’t make it spit the location out to confirm).
So, maybe anything outside
/app/src is readonly and pub is just bad at reporting failures? I tried setting
PUB_CACHE which the docs say will change the location of the pub cache:
PUB_CACHE=/app/src/.pub-cache && echo $PUB_CACHE && dart-sdk/bin/pub get && ls -la /app/src/.pub-cache
However still, the files aren’t there. Is there something weird with the filesystem here or am I doing something dopey?