Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
williamwong opened this issue Dec 4, 2022 · 3 comments · Fixed by #22
Closed

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

williamwong opened this issue Dec 4, 2022 · 3 comments · Fixed by #22

Comments

@williamwong
Copy link

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.

@JustMrMendez
Copy link

same

@michmich112 michmich112 self-assigned this Dec 5, 2022
@michmich112 michmich112 linked a pull request Dec 5, 2022 that will close this issue
@michmich112 michmich112 mentioned this issue Dec 5, 2022
@michmich112
Copy link
Owner

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

@williamwong
Copy link
Author

@michmich112 seems to work perfectly, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants