michmich112/sveltekit-adapter-chrome-extension

Error while building: "TypeError: getStaticDirectory is not a function"

Closed this issue · 3 comments

This breaking change sveltejs/kit#7800 removed getStaticDirectory() from the builder, resulting in the following error during build:

error during build:
TypeError: getStaticDirectory is not a function
    at reWriteExtensionManifest (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/sveltekit-adapter-chrome-extension/index.js:154:31)
    at adapt (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/sveltekit-adapter-chrome-extension/index.js:67:7)
    at async adapt (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/@sveltejs/kit/src/core/adapt/index.js:28:2)
    at async Object.handler (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/@sveltejs/kit/src/exports/vite/index.js:522:6)
    at async PluginDriver.hookParallel (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/rollup/dist/es/shared/rollup.js:22670:17)
    at async Object.close (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/rollup/dist/es/shared/rollup.js:23750:13)
    at async Promise.all (index 0)
    at async build (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45242:13)
    at async CAC.<anonymous> (file:///Users/will/DevTest/sveltekit-extension-test/node_modules/vite/dist/node/cli.js:756:9)

It seems like replacing that call with getClientDirectory() should work instead.

@williamwong @JustMrMendez - v1.5.0 should fix this issue.
Please let me know if this issue persists even when bumping up to that version

@michmich112 seems to work perfectly, thanks!