plentico / plenti

Static Site Generator with Go backend and Svelte frontend
https://plenti.co
Apache License 2.0
985 stars 50 forks source link

Handle Nested Directory in NPM Modules #231

Closed hlanderdev closed 1 year ago

hlanderdev commented 1 year ago

Running into this error when node_modules/ contains a module with a nested dir, example: "@stripe/stripe-js"
Error: runtime error: slice bounds out of range [:1] with length 0

jimafisk commented 1 year ago

I spoke with @highlanderdev, this was regarding npm install @stripe/stripe-js from https://www.npmjs.com/package/@stripe/stripe-js.

The ultimate cause of this issue was running npm audit fix which updated the Svelte version being used in the project. Currently we need to preprocess the Svelte compiler in order for it to run in V8 without errors, so upgrading to newer versions unfortunately breaks the builds. We're looking into more sustainable ways to run our builds in the future to avoid this confusion.