You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Angular 17 SSR deployment does not work on windows #6543
firebase-tools: The current master branch with Commit 721c330
Platform: Windows
[REQUIRED] Test case
Generate a new Angular 17 SSR enabled application
Setup firebase deployment with the web frameworks feature
Add "firebase-tools": "firebase/firebase-tools#master", to your package.json and run npm install to use the current master branch
[REQUIRED] Steps to reproduce
Run npx firebase deploy on Windows
Open the browser and access our deployed app
[REQUIRED] Expected behavior
Running npx firebase deploy on Windows generates a valid Angular SSR function.
[REQUIRED] Actual behavior
Look at the Google Cloud Function Logs and find the following error. Note the slashes are missing. The required module is actually located at /workspace/dist/your-project-name/server/server.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/workspace/distyour-project-nameserver/server.mjs' imported from /workspace/bootstrap.js
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:327:11)
at moduleResolve (node:internal/modules/esm/resolve:946:10)
at defaultResolve (node:internal/modules/esm/resolve:1132:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ESMLoader.import (node:internal/modules/esm/loader:524:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1188:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:429:21)
To verify this look at the bootstrap.js file in the .firebase/<your-project-id>/functions and see the path to the server.mjs
contains backslashes: ./dist\your-project-name\server/server.mjs
Activity
Fix Angular SSR deployment on Windows
sonallux commentedon Nov 25, 2023
I have created a PR for this: #6544
Fix Angular SSR deployment on Windows
Fix Angular SSR deployment on Windows
Fix Angular SSR deployment on Windows
Fix Angular SSR deployment on Windows
Fix Angular SSR deployment on Windows (#6544)
Merging master into next. (#6619)
Merging master (#814)