encore icon indicating copy to clipboard operation
encore copied to clipboard

fix: use test mode as not production

Open rtritto opened this issue 1 year ago • 3 comments

Test mode should be used for test and development and not for production.

rtritto avatar Dec 01 '24 17:12 rtritto

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why Encore requires a CLA and what the CLA includes.

Have you signed the CLA already but the status is still pending? Recheck it.

encore-cla[bot] avatar Dec 01 '24 17:12 encore-cla[bot]

What problem is this change solving for you? I'm not sure this is the right thing to do to in the general case.

eandre avatar Dec 01 '24 17:12 eandre

In development, usually the process.env.NODE_ENV is undefined or development. So when I started, I got:

file:///C:/Users/<USER>/AppData/Local/Yarn/Berry/cache/encore.dev-npm-1.44.6-3d86b75c4d-10c0.zip/node_modules/encore.dev/dist/internal/runtime/mod.js:5
export const RT = new Runtime({
                  ^

Error: failed to initialize runtime: unable to parse app metadata file

Caused by:
    failed to read file: The system cannot find the path specified. (os error 3)
    at file:///C:/test-encore-win/Local/Yarn/Berry/cache/encore.dev-npm-1.44.6-3d86b75c4d-10c0.zip/node_modules/encore.dev/dist/internal/runtime/mod.js:5:19
    at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:483:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5) {
  code: 'GenericFailure'
}

because of: https://github.com/encoredev/encore/blob/af07a53709ed9942f7fc6a1489cec3ff539aaa54/runtimes/js/encore.dev/internal/runtime/mod.ts#L6

rtritto avatar Dec 01 '24 18:12 rtritto