File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/runtime/src/helpers Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,15 @@ export const writeFunctionConfiguration = async (functionInfo: FunctionInfo) =>
38
38
const nodeModulesPath = join ( resolveModuleRoot ( NEXT_PLUGIN ) , 'package.json' )
39
39
40
40
const nextPluginVersion =
41
- ( await getNextRuntimeVersion ( nodeModulesPath , true ) ) || ( await getNextRuntimeVersion ( pluginPackagePath , false ) )
41
+ ( await getNextRuntimeVersion ( nodeModulesPath , true ) ) ||
42
+ ( await getNextRuntimeVersion ( pluginPackagePath , false ) ) ||
43
+ // The runtime version should always be available, but if it's not, return 'unknown'
44
+ 'unknown'
42
45
43
46
const metadata = {
44
47
config : {
45
48
name : functionTitle ,
46
- generator : `${ NEXT_PLUGIN_NAME } @${ nextPluginVersion || 'unknown' } ` ,
49
+ generator : `${ NEXT_PLUGIN_NAME } @${ nextPluginVersion } ` ,
47
50
} ,
48
51
version : 1 ,
49
52
}
You can’t perform that action at this time.
0 commit comments