Skip to content
← Back to activity

Public problem

The ENCORE_RUNTIME_LIB environment variable is not set (yarn start on Windows)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

On Windows I cloned a minimal Encore repro and ran yarn start, which died with The ENCORERUNTIMELIB environment variable is not set. The runtime binary couldnt be located because I was starting the app with plain node instead of the Encore tooling. Another user hit the same error running npm run test with vitest. A maintainer answered on the thread, and the issue was closed in April 2025.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

ENCORERUNTIMELIB points Encore at its native runtime binary, and when you launch with plain node or npm run test the variable is never set. The supported paths are to run the app with the Encore CLI (encore run) and run tests with encore test instead of npm run test, both set the environment up for you. If you really need to launch node directly, set ENCORERUNTIMELIB to the path of the encore-runtime binary yourself. Source: https://github.com/encoredev/encore/issues/1611

Source: https://github.com/encoredev/encore/issues/1611