Skip to content
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

Error on first time running elm-pages #319

Open
arkaitz-dev opened this issue Nov 29, 2024 · 4 comments
Open

Error on first time running elm-pages #319

arkaitz-dev opened this issue Nov 29, 2024 · 4 comments

Comments

@arkaitz-dev
Copy link

elm-pages dev
elm-pages dev server running at http://localhost:1234
Ran in 2ms /elm.js
Ran elm-review in 252ms
-- UNEXPECTED ERROR --------------- /home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-pages/generator/review/elm.json
I ran into an unexpected error. Please open an issue at the following link:
https://github.com/jfmengels/node-elm-review/issues/new

Please include this error message and as much detail as you can provide. If you
can, please provide a setup that makes it easy to reproduce the error. That will
make it much easier to fix the issue.

Below is the error that was encountered.

/home/arkaitz/proyectos/elm/prueba_pages/elm-stuff/generated-code/jfmengels/elm-review/elm-pages/2.12.0/review-applications/59274e92599855caa16357e0a28a68ee.js:6089
var $jfmengels$elm_review$Review$Exceptions$isFileWeWantReportsFor = F2(function $jfm);
^

SyntaxError: Unexpected token ')'
at wrapSafe (node:internal/modules/cjs/loader:1378:20)
at Module._compile (node:internal/modules/cjs/loader:1428:41)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at loadCompiledElmApp (/home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-review/lib/load-compiled-app.js:28:10)
at initWithoutWorker (/home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-review/lib/app-wrapper.js:110:21)
at init (/home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-review/lib/app-wrapper.js:35:10)
Trace: problem with format in reviewReportJsonString TypeError: Cannot read properties of undefined (reading 'length')
at emptyReviewError (file:///home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-pages/generator/src/dev-server.js:613:55)
at handleNavigationRequest (file:///home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-pages/generator/src/dev-server.js:461:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at emptyReviewError (file:///home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-pages/generator/src/dev-server.js:615:15)
at handleNavigationRequest (file:///home/arkaitz/.nvm/versions/node/v20.18.0/lib/node_modules/elm-pages/generator/src/dev-server.js:461:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Ran in 261ms /content.dat

@lishaduck
Copy link
Contributor

lishaduck commented Nov 29, 2024

@jfmengels, would you agree that this looks suspiciously like #313?

Perhaps it's an existing race condition that the promise work I did exacerbated?

@jfmengels
Copy link
Owner

Hi @arkaitz-dev

Even though it does literally say to open an issue here, I think the issue probably lies with elm-pages somehow (which uses elm-review). cc @dillonkearns
I'm not sure what the cause may be. It looks like the compiled output was cut off somehow.

@jfmengels
Copy link
Owner

jfmengels commented Nov 29, 2024

@lishaduck It's possible, yes.

@lishaduck
Copy link
Contributor

Took a closer look. The stacktrace is the same (it's wrapped with a bunch of elm-pages traces and has esm loader stuff (b/c elm-pages is esm?) but it looks the same to me, so I'll work on reproing it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants