Skip to content

Commit 3f5913d

Browse files
committed
fix(snap-test): also create lib subdirectory in npm global prefix
npm expects a `lib/` subdirectory inside NPM_CONFIG_PREFIX for global operations like link and outdated -g.
1 parent a24b7de commit 3f5913d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/tools/src/snap-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function snapTest() {
113113
fs.mkdirSync(tempTmpDir, { recursive: true });
114114
// Pre-create the npm global prefix directory so tests using npm global
115115
// operations (link, outdated -g, etc.) don't fail with ENOENT.
116-
fs.mkdirSync(path.join(tempTmpDir, 'npm-global-lib-for-snap-tests'));
116+
fs.mkdirSync(path.join(tempTmpDir, 'npm-global-lib-for-snap-tests', 'lib'), { recursive: true });
117117

118118
// Clean up stale .node-version and package.json in the system temp directory.
119119
// vite-plus walks up the directory tree to resolve Node.js versions, so leftover

0 commit comments

Comments
 (0)