"Could not determine component name from file path" when compiling a module for SSR
Closed this issue · 1 comments
lpomerleau commented
Description
Steps to Reproduce
See lwc#2400
here.
In this PR, we are integrating the @lwc/ssr-compiler
into LWR-Node for TD-0205202. We started passing TransformOptions.targetSSR = true
into @lwc/compiler#transformSync
.
- Clone the
lwr
repo - Checkout the
laura/ssr-compiler
branch yarn
(install + build)yarn ssr:start
- Visit http://localhost:4000
Expected Results
The LWC modules are compiled for SSR.
Actual Results
The @lwc/ssr-compiler
cannot parse the filename passed to it:
[error] LWR Diagnostic Error: An unexpected error occurred: "Could not determine component name from file path: /Users/lpomerleau/git/lwr/packages/test-apps/lwr-ssr-app/src/modules/demo/localeSelector/localeSelector.ts"
Error is being thrown here.
Browsers Affected
Node.js
Version
Node project
package.json
"peerDependencies": { "@lwc/compiler": ">= 2.x" }
"devDependencies": { "@lwc/compiler": "7.2.6" }
- LWC: 7.2.6
Possible Solution
Is LWR-Node passing in a bad filename? We pass the same filenames to the @lwc/compiler
, but maybe the SSR compiler has different requirements.
nolanlawson commented