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

Errors with Next 13 #13

Open
twhid opened this issue Jan 11, 2023 · 0 comments
Open

Errors with Next 13 #13

twhid opened this issue Jan 11, 2023 · 0 comments

Comments

@twhid
Copy link

twhid commented Jan 11, 2023

Hi,

It doesn't appear that the current code/getting started works any longer. Following the instructions in the readme and running fastly compute serve but the code doesn't build. These seem to be the relevant errors:

✘ [ERROR] Transforming destructuring to the configured target environment ("es5") is not supported yet

    bin/index.js:2:1280309:
      2 │ ...default.Component{render(){const{statusCode:e,withDarkMode:t=!0}...
        ╵                                    ^

  The target environment was set to "es5" here:

    ../tsconfig.json:3:14:
      3 │     "target": "es5",
        ╵               ~~~~~

/Users/timwhidden/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:157
      throw new Error("Invalid packet");
      ^

Error: Invalid packet
    at ByteBuffer._read (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:157:13)
    at ByteBuffer.read (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:171:20)
    at visit (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:94:30)
    at visit (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:109:43)
    at visit (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:109:43)
    at visit (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:101:23)
    at visit (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:109:43)
    at decodePacket (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:121:15)
    at handleIncomingPacket (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:726:18)
    at Socket.readFromStdout (/Users/projects/next-js-compute/compute-js/node_modules/esbuild/lib/main.js:656:7)

There are very, very many tsconfig errors and then the last error is the Invalid packet error before the fastly compute serve command exits.

Seems weird because I assume the next build would transform the TS to JS so it's unclear to me why the fastly compute build would be doing anything with TS.. or perhaps whatever is transforming the destructuring is just pointing out that the TS target is off. The tsconfig was generated by create-next-app.

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