Issue while migrating from next 13 to next 14
Unanswered
Philippine Crocodile posted this in #help-forum
Philippine CrocodileOP
I am upgrading next version 13.4.1 to 14.2.0 and using react 18.2.0.
After compilation facing below error:
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
Please let me know how to overcome this issue.
After compilation facing below error:
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
Please let me know how to overcome this issue.