next.js
77c69a71 - Turbopack: improve error message for incompatible swc plugins (#86346)

Commit
6 days ago
Turbopack: improve error message for incompatible swc plugins (#86346) Before: ``` Module not found: Can't resolve 'next/dist/esm/build/templates/helpers' failed to analyze ecmascript module '[project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js [ssr] (ecmascript)' Caused by: - failed to parse [project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js - Transforming and/or parsing of [project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js failed - failed to deserialize `swc_common::plugin::diagnostics::PluginCorePkgDiagnostics` - Mismatch { name: "array", found: 48 } Debug info: - Execution of <ModuleAssetContext as AssetContext>::process_resolve_result failed - Execution of <ModuleAssetContext as AssetContext>::process failed - Execution of <EcmascriptModuleAsset as Module>::side_effects failed - Execution of analyze_ecmascript_module failed - failed to analyze ecmascript module '[project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js [ssr] (ecmascript)' - Execution of <EcmascriptModuleAsset as EcmascriptParsable>::failsafe_parse failed - Execution of parse failed - failed to parse [project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js - Transforming and/or parsing of [project]/node_modules/.pnpm/next@file+..+next-repo-2bf56e024dbccc85257a8c308492f2375d690b206153b02d3bea2029707d4c38+packa_tacnzof7rtmb5bwqa7bdnfcdbq/node_modules/next/dist/esm/build/templates/helpers.js failed - failed to deserialize `swc_common::plugin::diagnostics::PluginCorePkgDiagnostics` - Mismatch { name: "array", found: 48 } Import map: aliased to module 'next' with subpath '/dist/esm/build/templates/helpers' inside of [project]/ https://nextjs.org/docs/messages/module-not-found ``` After: ``` ./packages/next/document.js Failed to execute SWC plugin An unexpected error occurred when executing an SWC EcmaScript transform plugin. This might be due to a version mismatch between the plugin and Next.js. Failed to execute @swc/plugin-react-remove-properties Caused by: 0: failed to deserialize `swc_common::plugin::diagnostics::PluginCorePkgDiagnostics` 1: Mismatch { name: "array", found: 48 } ```
Author
Parents
Loading