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

Netlify build failing on next-contentlayer #68

Closed
seancdavis opened this issue Dec 8, 2021 · 3 comments
Closed

Netlify build failing on next-contentlayer #68

seancdavis opened this issue Dec 8, 2021 · 3 comments

Comments

@seancdavis
Copy link
Collaborator

This is using the Next on Netlify build plugin. Here's the message.

6:18:30 AM: ────────────────────────────────────────────────────────────────
6:18:30 AM:   Plugin "@netlify/plugin-nextjs" failed                        
6:18:30 AM: ────────────────────────────────────────────────────────────────
6:18:30 AM: ​
6:18:30 AM:   Error message
6:18:30 AM:   /opt/build/repo/node_modules/next-contentlayer/dist/index-cjs.cjs:23
6:18:30 AM:                   return nextConfig.redirects?.() ?? [];
6:18:30 AM:                                               ^
6:18:30 AM: ​
6:18:30 AM:   SyntaxError: Unexpected token '.'
6:18:30 AM: ​
6:18:30 AM:   Plugin details
6:18:30 AM:   Package:        @netlify/plugin-nextjs
6:18:30 AM:   Version:        3.9.2
6:18:30 AM:   Repository:     git+https://github.com/netlify/netlify-plugin-nextjs.git
6:18:30 AM:   npm link:       https://www.npmjs.com/package/@netlify/plugin-nextjs
6:18:30 AM:   Report issues:  https://github.com/netlify/netlify-plugin-nextjs/issues
@schickling
Copy link
Collaborator

Contentlayer requires Node.js 14 or later. Can you confirm that's what's being used in the given build/runtime environment on Netlify? (Ideally please verify this via a node -v log statement somewhere.)

@seancdavis
Copy link
Collaborator Author

Logged an issue with the plugin. Contains a few more details: opennextjs/opennextjs-netlify#944

I'll report back here.

@schickling
Copy link
Collaborator

Seems to be resolved upstream :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants