Skip to content

FAQs

Module not found: Error: Can’t resolve ‘garden/app’

Make sure you have added the garden config to your lwc.config.json file.

lwr.config.json
{
"lwc": {
"modules": [
{
"dir": "./.garden/components",
"namespace": "garden"
},
{
"dir": "./force-app/main/default/lwc",
"namespace": "c"
}
]
}
}

SyntaxError: Cannot use import statement outside a module

Add "type": "module" to your package.json file:

package.json
{
"name": "sfdx-starter",
"version": "1.0.0",
"type": "module",
"scripts": {},
"devDependencies": {}
}

Error: [LWC error]: LWC WARNING: current engine is v6.0.0, but template was compiled with v5.0.0.

Error: [LWC error]: LWC WARNING: current engine is v6.0.0, but template was compiled with v5.0.0. Please update your compiled code or LWC engine so that the versions match. No further warnings will appear.

Update your lwc package to match the current version.