Skip to content

Commit

Permalink
fix: action fc3 invoke timeout
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <[email protected]>
  • Loading branch information
zxypro1 committed Apr 9, 2024
1 parent 76bfc7d commit e523b91
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/engine",
"version": "0.1.2-beta.7",
"version": "0.1.2-beta.8",
"description": "a engine lib for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/load-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/load-component",
"version": "0.0.7-beta.3",
"version": "0.0.7-beta.4",
"description": "request for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions packages/load-component/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ const getEntryFile = async (componentPath: string) => {

export const buildComponentInstance = async (componentPath: string, params?: any) => {
const requirePath = await getEntryFile(componentPath);
// bug: `- component: fc invoke` timeout. Delete require cache
try {
delete require.cache[requirePath];
} catch {}
const baseChildComponent = await require(requirePath);

const ChildComponent = baseChildComponent.default || baseChildComponent;
Expand Down

0 comments on commit e523b91

Please sign in to comment.