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

1.0.13 breaks build #712

Open
reilnuud opened this issue Feb 10, 2022 · 5 comments
Open

1.0.13 breaks build #712

reilnuud opened this issue Feb 10, 2022 · 5 comments

Comments

@reilnuud
Copy link

Getting an error during build:

Error message
Could not import plugin:
/opt/build/repo/node_modules/@algolia/netlify-plugin-crawler/src/index.ts:1
import type { NetlifyPluginOptions, NetlifyPluginUtils } from '@netlify/build';
^^^^^^

SyntaxError: Cannot use import statement outside a module

I think upgrading node-fetch to a version >2 led to this problem since version >=3 doesn't support CJS. We had to downgrade to 1.0.12.

The version should either but adjusted accordingly (not a minor version) or node-fetch should be downgraded.

@bodinsamuel
Copy link
Contributor

Hey @reilnuud

Thanks for reporting, I confirm the issue, it must have slipped during our review.
I'll try to post a fix today.

@bodinsamuel
Copy link
Contributor

Hi again,

We have released a new version that revert node-fetch until we figure out the best way to make it work.

However we have been by a second issue that happen for some Typescript configuration (not related from us).
So you can try to upgrade to 1.0.14 but you might encounter the same error as this person unfortunately #713

I'll keep you posted on the fix,
Thanks again for reporting 🙏🏻

@reilnuud
Copy link
Author

Thanks! We'll test the new version next week.

@benistary
Copy link

Hi I encountered same error with 1.0.14 version
image

@bodinsamuel
Copy link
Contributor

Hello,
We have released the 1.0.15, can you try and see if it fixes your issue?

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

3 participants