Sign Up
Go Pro Sign Up Login

Buy Now and unlock this series




yours forever

Become a Pro and unlock everything




per month

Creating an NPM Package With Svelte Kit

Here we will explore a new feature in Svelte Kit which will allow us to create an NPM package with ease. npm run package


Become a pro to download code and videos



about 2 months ago [edited]

Running npm run package on svelte version ^3.41.0 outputs the error:

> You need to install svelte2tsx and typescript if you want to generate type definitions
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'svelte2tsx' imported from .../node_modules/@sveltejs/kit/dist/chunks/index8.js

Required me to install svelte2tsx to dev dependencies and then run package.

Want to join the conversation?

Become a Pro member today!