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

next 12.1.0 with grpc #35412

Closed
1 task done
moale opened this issue Mar 17, 2022 · 3 comments
Closed
1 task done

next 12.1.0 with grpc #35412

moale opened this issue Mar 17, 2022 · 3 comments
Labels
please add a complete reproduction Please add a complete reproduction.

Comments

@moale
Copy link

moale commented Mar 17, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64
Binaries:
Node: 16.14.0
npm: 8.3.2
Yarn: 1.22.17
pnpm: N/A
Relevant packages:
next: 12.1.1-canary.14
react: 17.0.2
react-dom: 17.0.2

What browser are you using? (if relevant)

chrome 99.0.4844.74

How are you deploying your application? (if relevant)

No response

Describe the Bug

after upgrade next from 12.0.1 to 12.1.0 i got an error on grpc generated files

error - ./proto_build/todo_grpc_web_pb.js
Module parse failed: Cannot use 'import.meta' outside a module (144:16)
File was processed with these loaders:

  • ./node_modules/next/dist/compiled/@next/react-refresh-utils/loader.js
  • ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
    You may need an additional loader to handle the result of these loaders.
    | // still a Refresh Boundary later.
    | // @ts-ignore importMeta is replaced in the loader
            import.meta.webpackHot.accept();

Expected Behavior

no error expected like for version 12.0.1

To Reproduce

upgrade next to v12.1.0

@moale moale added the bug Issue was opened via the bug report template. label Mar 17, 2022
@balazsorban44 balazsorban44 added please add a complete reproduction Please add a complete reproduction. and removed bug Issue was opened via the bug report template. labels Mar 18, 2022
@moale
Copy link
Author

moale commented Mar 25, 2022

i finally figure out the issue, it's related to "type": "commonjs" in package.json removing it, works on next 12.1.X

@balazsorban44
Copy link
Member

This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think this was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
please add a complete reproduction Please add a complete reproduction.
Projects
None yet
Development

No branches or pull requests

2 participants