Layer0 Next example doesn't work as expected

I went to Layer0 Documentation - Next.js and tried to download and run the Next.js example but I get the following message and the subsequent error after I run layer0 dev when visiting http://127.0.0.1:3000

**Layer** **0** ready on **http://127.0.0.1:3000**

Next > Creating service worker...

Next (node:37991) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.

BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.

Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.

Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.

Next > Creating service worker...

Next warn - InjectManifest has been called multiple times, perhaps due to running webpack in --watch mode. The precache manifest generated after the first call may be inaccurate! Please see https://github.com/GoogleChrome/workbox/issues/1790 for more information.

autostatic/chunks/pages/_app.js is 9.31 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

autostatic/chunks/main.js is 4.32 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.

Next info - ready on http://localhost:3001

undefined Could not connect to backend 127.0.0.1: socket hang up

This is logged as XDN-11184

We’ve pushed an update to the Layer0 example repo that resolves this issue. This change includes upgraded dependency versions so you will need to npm i to obtain the latest packages.

1 Like