Skip to content

Commit bc7b5a6

Browse files
committed
chore: fixed an error causing tests to fail
1 parent 2b11cf0 commit bc7b5a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/runtime/src/helpers/functionsMetaData.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export interface FunctionInfo {
3535
export const writeFunctionConfiguration = async (functionInfo: FunctionInfo) => {
3636
const { functionName, functionTitle, functionsDir } = functionInfo
3737
const pluginPackagePath = '.netlify/plugins/package.json'
38-
const nodeModulesPath = join(resolveModuleRoot(NEXT_PLUGIN), 'package.json')
38+
const moduleRoot = resolveModuleRoot(NEXT_PLUGIN)
39+
const nodeModulesPath = moduleRoot ? join(moduleRoot, 'package.json') : null
3940

4041
const nextPluginVersion =
4142
(await getNextRuntimeVersion(nodeModulesPath, true)) ||

0 commit comments

Comments
 (0)