Closed
Description
TLDR: how to actually use this library? 0__o
... project template?
when i run the example json_schema_validation.svelte, i get the error
Uncaught SyntaxError: The requested module '/node_modules/.pnpm/[email protected]/node_modules/debug/src/browser.js?v=ab0664fe' does not provide an export named 'default'
from
backtrace
// node_modules/debug/src/browser.js
module.exports = require('./common')(exports);
// node_modules/debug/src/common.js
function setup(env) {
createDebug.debug = createDebug;
// ...
return createDebug;
}
module.exports = setup;
looks like a problem with vite and commonjs ...
reproduce
npm i -g pnpm
pnpx create-vite frontend --template svelte
cd frontend
pnpm install svelte-jsoneditor
cd src
curl -L -o App.svelte https://github.com/josdejong/svelte-jsoneditor/raw/main/src/routes/examples/json_schema_validation.svelte
sed -i 's/\$lib/svelte-jsoneditor/' App.svelte
cd ..
npm run dev
related
also pnpm does not run the prepare
script when i install from git ...
npm rm svelte-jsoneditor
pnpm i https://github.com/josdejong/svelte-jsoneditor.git
stat node_modules/svelte-jsoneditor/dist
stat: cannot statx 'node_modules/svelte-jsoneditor/dist': No such file or directory
Metadata
Metadata
Assignees
Labels
No labels