添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

This is currently throwin an error trying to run the app

[ error ] ./node_modules/next/dist/client/dev/amp-dev.js
ReferenceError: [BABEL] ~REDACTED~/node_modules/next/dist/client/dev/amp-dev.js: Unknown option: .preset-env. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

Pretty sure preset-env is valid... Am I missing something?

Nextjs version : 9.0.1

This does not seem to be a bug in Next.js, please use Spectrum for questions

I guess you're simply missing additional pair of [ ] here:

 presets: [
-        'next/babel', {
+       ['next/babel', {
            'preset-env': {
                'targets': '> 0.25%',
+       }],
        '@emotion/babel-preset-css-prop',

Example: https://github.com/zeit/next.js/blob/9c8d34d551e1a3729d91c86f0b62547f0d79044f/examples/custom-server-typescript/.babelrc