info - Creating an optimized production build
Failed to compile.
static/chunks/pages/admin/login.test-c4d42d790c623893.js from Terser
x The left-hand side of an assignment expression must be a variable or a property access.
,----
302 | "http://localhost:8089" = 'mockURL';
: ^^^^^^^^^^^^^^^^^^^^^^^
`----
Caused by:
0: failed to parse input file
1: error was recoverable, but proceeding would result in wrong codegen
2: Syntax Error
Error:
x The left-hand side of an assignment expression must be a variable or a property access.
,----
302 | "http://localhost:8089" = 'mockURL';
: ^^^^^^^^^^^^^^^^^^^^^^^
`----
Caused by:
0: failed to parse input file
1: error was recoverable, but proceeding would result in wrong codegen
2: Syntax Error
> Build failed because of webpack errors
the reason is that it's trying to compile the test files
according to the docs and some reasearch, it's not possible to exclude test files when buildling with NextJS: https://stackoverflow.com/a/72866599
Locally:
the reason is that it's trying to compile the test files
according to the docs and some reasearch, it's not possible to exclude test files when buildling with NextJS: https://stackoverflow.com/a/72866599
so to fix the issue we need to move the tests out