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.
Getting an error during build:
I think upgrading
node-fetchto 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.