You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I deployed my service to Heroku using the Svelte kit. (adapter-node)
But I ran into the following problem.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tslib' imported from /app/server/entries/pages/index.svelte.js
The cause of this problem is that Heroku does not install devDependencies by default.
The index.svelte.js file created by the adapter depends on the external package 'tslib'.
import { __extends, __assign, __values } from "tslib";
So, I moved tslib to dependencies, but I'm not sure if this is the right way.
According to the Heroku documentation, there seems to be an option to use devDependencies. However, in this case, the app seems to be heavy because it installs all the dependencies.
What is the most correct solution?
Reproduction
svelte.config.js
import adapter from '@sveltejs/adapter-node'
import preprocess from 'svelte-preprocess'
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
},
}
export default config
Describe the bug
I deployed my service to Heroku using the Svelte kit. (adapter-node)
But I ran into the following problem.
The cause of this problem is that Heroku does not install devDependencies by default.
The index.svelte.js file created by the adapter depends on the external package 'tslib'.
So, I moved tslib to dependencies, but I'm not sure if this is the right way.
According to the Heroku documentation, there seems to be an option to use devDependencies. However, in this case, the app seems to be heavy because it installs all the dependencies.
What is the most correct solution?
Reproduction
svelte.config.js
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: