New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom build directory: server `build_dir` relative to project root #481

Open
laurentpayot opened this Issue Oct 18, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@laurentpayot

laurentpayot commented Oct 18, 2018

I'm generating a firebase-hosted sapper app in a custom directory within my project with
sapper build firebase/functions/app

When I serve my build with Firebase I get:

Error: ENOENT: no such file or directory, open 'firebase/functions/app/build.json'
    at Object.fs.openSync (fs.js:646:18)
    at fs.readFileSync (fs.js:551:33)
    at Ie (/home/laurent/projects/my-project/firebase/functions/app/server/server.js:70:20865)

This is because the build_dir constant in the server template is set to firebase/functions/app but the server is not run from the project root directory by Firebase. build_dir should be able to be set to a correct value by Firebase (using __dirname).

This issue appeared when I upgraded sapper to use the new folder structure.
Before that, process.env.SAPPER_DEST (manually set) was taken into account and the server was working, as described in #368.

laurentpayot added a commit to laurentpayot/sapper that referenced this issue Oct 18, 2018

laurentpayot added a commit to laurentpayot/sapper that referenced this issue Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment