When I build my application vianuxt build in Heroku I see the following error message:
ERROR ENOENT: no such file or directory, open '/tmp/build_c0584bd6/static/sw.js'
WARN This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
ERROR Error: ENOENT: no such file or directory, open '/tmp/build_c0584bd6/static/sw.js'
From my understanding the error occurs, because it tries to access the sw.js file from my previous build located at the path '/tmp/build_c0584bd6/static/sw.js'. However, as Heroku creates a new isolated instance for every build/deploy (ref: https://stackoverflow.com/questions/17289459/heroku-tmp-folder-deletion) it totally makes sense that this file cannot be accessed.
How can I get rid of this error during my build in Heroku?
Hey,
When I build my application via
nuxt build
in Heroku I see the following error message:From my understanding the error occurs, because it tries to access the
sw.js
file from my previous build located at the path'/tmp/build_c0584bd6/static/sw.js'
. However, as Heroku creates a new isolated instance for every build/deploy (ref: https://stackoverflow.com/questions/17289459/heroku-tmp-folder-deletion) it totally makes sense that this file cannot be accessed.How can I get rid of this error during my build in Heroku?
Thanks in advance!