Skip to content

Commit 42885cf

Browse files
committed
Fix test-wrapper script by adding rootNodeModulesBinPath to constants
The test:wrapper script was failing in CI with: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined Added rootNodeModulesBinPath property to constants object with lazy getter that resolves to rootPath/node_modules/.bin
1 parent eb9daca commit 42885cf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/constants.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ const lazyDistPath = () => path.join(constants.rootPath, 'dist')
7878
const lazyExternalPath = () => path.join(constants.distPath, 'external')
7979

8080
const lazyRootPackageJsonPath = () =>
81-
path.join(constants.rootPath, 'package.json')
81+
path.join(constants.rootPath, constants.PACKAGE_JSON)
8282

8383
const lazyRootPackageLockPath = () =>
84-
path.join(constants.rootPath, 'pnpm-lock.yaml')
84+
path.join(constants.rootPath, constants.PNPM_LOCK_YAML)
85+
86+
const lazyRootNodeModulesBinPath = () =>
87+
path.join(constants.rootPath, constants.NODE_MODULES, '.bin')
8588

8689
const lazyRootPath = () =>
8790
path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
@@ -133,6 +136,7 @@ const constants = createConstantsObject(
133136
distPath: undefined,
134137
externalPath: undefined,
135138
rootPackageJsonPath: undefined,
139+
rootNodeModulesBinPath: undefined,
136140
rootPath: undefined,
137141
socketRegistryPath: undefined,
138142
srcPath: undefined,
@@ -146,6 +150,7 @@ const constants = createConstantsObject(
146150
externalPath: lazyExternalPath,
147151
rootPackageJsonPath: lazyRootPackageJsonPath,
148152
rootPackageLockPath: lazyRootPackageLockPath,
153+
rootNodeModulesBinPath: lazyRootNodeModulesBinPath,
149154
rootPath: lazyRootPath,
150155
socketRegistryPath: lazySocketRegistryPath,
151156
srcPath: lazySrcPath,

0 commit comments

Comments
 (0)