Skip to content

Commit dea254f

Browse files
committed
fix: add link to repo readme for more details
1 parent 9463872 commit dea254f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/helpers/serverModuleHelpers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ const fixServerTs = async function ({ angularVersion, siteRoot, failPlugin, fail
152152
return usedEngineBasedOnKnownSignatures
153153
}
154154

155+
const moreDetailsInRepoReadme = `\n\nCheck https://github.com/netlify/angular-runtime README for more details.`
156+
155157
// if we can't determine engine based on known signatures, let's first try to check if module is already
156158
// Netlify compatible to determine if it can be used as is or if user intervention is required
157159
// we will look for "netlify<Engine>Handler" which is named export that we will rely on and it's existence will
@@ -163,7 +165,7 @@ const fixServerTs = async function ({ angularVersion, siteRoot, failPlugin, fail
163165
if (isNetlifyAppEngine && isNetlifyCommonEngine) {
164166
// both exports found - we can't determine which engine is used
165167
failBuild(
166-
"server.ts seems to contain both 'netlifyAppEngineHandler' and 'netlifyCommonEngineHandler' - it should contain just one of those.",
168+
`server.ts seems to contain both 'netlifyAppEngineHandler' and 'netlifyCommonEngineHandler' - it should contain just one of those.${moreDetailsInRepoReadme}`,
167169
)
168170
}
169171

@@ -195,11 +197,13 @@ const fixServerTs = async function ({ angularVersion, siteRoot, failPlugin, fail
195197
errorMessage += `\n\nIf you want to use "AppEngine" - your server.ts file should contain following:\n\n\`\`\`\n${NetlifyServerTsAppEngine}\`\`\``
196198
}
197199

200+
errorMessage += moreDetailsInRepoReadme
201+
198202
failBuild(errorMessage)
199203
} else {
200204
// Angular 20+ made App Engine stable, so we should not recommend Common Engine anymore
201205
failBuild(
202-
`server.ts doesn't seem to be Netlify compatible and is not known default. Please replace it with Netlify compatible server.ts:\n\n\`\`\`\n${NetlifyServerTsAppEngine}\`\`\``,
206+
`server.ts doesn't seem to be Netlify compatible and is not known default. Please replace it with Netlify compatible server.ts:\n\n\`\`\`\n${NetlifyServerTsAppEngine}\`\`\`${moreDetailsInRepoReadme}`,
203207
)
204208
}
205209
}

0 commit comments

Comments
 (0)