From 2a90dc9d51e55035fab752034f63af36ed1e0c7e Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Wed, 29 Dec 2021 21:57:35 -0800 Subject: [PATCH] Try adding path.resolve for netlify file paths. --- examples/pokedex/src/Page/Secret.elm | 3 +-- generator/src/render.js | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/pokedex/src/Page/Secret.elm b/examples/pokedex/src/Page/Secret.elm index 040872f6..8de7d87a 100644 --- a/examples/pokedex/src/Page/Secret.elm +++ b/examples/pokedex/src/Page/Secret.elm @@ -126,8 +126,7 @@ view maybeUrl sharedModel static = [ Html.h1 [] [ Html.text "You're not logged in" ] , Route.link Route.Login [] - [ Html.text <| "Login" - ] + [ Html.text <| "Login" ] ] ] } diff --git a/generator/src/render.js b/generator/src/render.js index 9231b3dc..9fad15af 100755 --- a/generator/src/render.js +++ b/generator/src/render.js @@ -226,7 +226,9 @@ function jsonOrNull(string) { async function runJob(app, filePath) { pendingDataSourceCount += 1; try { - const fileContents = (await fsPromises.readFile(filePath)).toString(); + const fileContents = ( + await fsPromises.readFile(path.resolve(filePath)) + ).toString(); const parsedFile = matter(fileContents); pendingDataSourceResponses.push({