Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

How to import svelte node-adapter build - handler.js, in a different node.js-express-typescript app?

$
0
0

I am new to Svelte and TypeScript.I have a Svelte + TypeScript project and a different backend project with node.js, express, and TypeScript.I want to deploy the Svelte app with the backend project I already have.Following [this] (https://kit.svelte.dev/docs/adapter-node#custom-server) documentation, I built the Svelte app via npm run build which generated the output in a "build" folder. I copied the "build" folder from the svelte project into my backend project and tried to import the handler.js from my src/app.ts as:

import { handler } from "../build/handler.js";

But the editor is giving me the following error on the import line:

Could not find a declaration file for module '../build/handler.js'. '.../build/handler.js' implicitly has an 'any' type.

How to fix this problem? Or am I doing something wrong?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>