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

Preview fails when next.js runs in dev mode #60

Closed
espen42 opened this issue Sep 15, 2021 · 3 comments
Closed

Preview fails when next.js runs in dev mode #60

espen42 opened this issue Sep 15, 2021 · 3 comments

Comments

@espen42
Copy link
Contributor

espen42 commented Sep 15, 2021

Dev mode (next dev) has special custom functionality, driven by webpack, that fails to run through the XP proxies.

Unhandled Runtime Error
ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed.
(error: http://localhost:8080/_next/static/chunks/node_modules_next_dist_client_dev_noop_js.js)

and

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'includes')

Failing assets in network tab:

node_modules_next_dist_client_dev_noop_js.js | 404 | script | webpack.js?ts=1631710165984:263 | 115 B | 106 ms
-- | -- | -- | -- | -- | --
webpack-hmr?page=%2F_draft%2F%5B%5B...contentPath%5D%5D | 404 | eventsource | persons | 159 B | 3 ms
_devPagesManifest.json | 404 | fetch | page-loader.js?ce6b:34 | 159 B | 2 ms
image?url=%2F_next%2Fstatic%2Fimage%2Fsrc%2Fpublic…ld.074583348b1b4aee2574f3e054e22a93.svg&w=96&q=75 | 404 | json | react-dom.development.js?61bb:683 | 44 B | 7 ms
__nextjs_original-stack-frame?isServerSide=false&f…require__.f.j&arguments=&lineNumber=735&column=29 | 404 | fetch | stack-frame.js?c06d:61 | 159 B | 6 ms
@espen42
Copy link
Contributor Author

espen42 commented Sep 15, 2021

Path resolution, or hydration-update problem after the SSR? Might be related to #61 .

@espen42
Copy link
Contributor Author

espen42 commented Sep 15, 2021

After adding /api/ to the processing in previewProxy, and the same processing in assetProxy, this appears to work.

@espen42
Copy link
Contributor Author

espen42 commented Oct 6, 2021

Handled in new approach.

@espen42 espen42 closed this as completed Oct 6, 2021
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

1 participant