SvelteKit adapter-utils deploy error

Hi,

I have not pushed to production for a couple of months, previously everything was working with my site alexcodes.co.uk.

I made some changes and pushed today. I ran a build on my local machine and everything worked fine, however when netlify tried to build, I encountered the following errors:

9:19:44 AM: > Using @sveltejs/adapter-netlify
9:19:44 AM:  > .svelte-kit/netlify/entry.js:3:36: error: Could not resolve "@sveltejs/kit/adapter-utils" (mark it as external to exclude it from the bundle)
9:19:44 AM:      3 ā”‚ ...TypeBinary } from '@sveltejs/kit/adapter-utils'; // eslint-disabl...
9:19:44 AM:        ā•µ                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9:19:44 AM:    node_modules/@sveltejs/kit/package.json:75:13: note: The path "./adapter-utils" is not exported by package "@sveltejs/kit"
9:19:44 AM:     75 ā”‚   "exports": {
9:19:44 AM:        ā•µ              ^
9:19:44 AM: > Build failed with 1 error:
9:19:44 AM: .svelte-kit/netlify/entry.js:3:36: error: Could not resolve "@sveltejs/kit/adapter-utils" (mark it as external to exclude it from the bundle)
9:19:44 AM: Error: Build failed with 1 error:
9:19:44 AM: .svelte-kit/netlify/entry.js:3:36: error: Could not resolve "@sveltejs/kit/adapter-utils" (mark it as external to exclude it from the bundle)

Iā€™m not sure what the issue could be here?

Hi @digidub,

2 things to try:

  1. Check if you have the modules that are reported missing in your package.json.
  2. Try doing as the error suggests - that is add those modules to the external section:
[functions]
  external_node_modules = []

Thank you for your reply. The netlify-adapter is in my package.json as such:

"devDependencies": {
    "@sveltejs/adapter-netlify": "^1.0.0-next.20",

I have tried adding the suggested

[functions]
  external_node_modules = []

to my netlify.toml but this has not solved the issue.

I have resolved the issue by updating the netlify adapter to the latest version. Thanks

1 Like