Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
SvelteKit cannot import Onboard.js

I am working on a SvelteKit project and have installed Onboard.js:

I am using the pnpm package manager, but it shouldn't make a difference:

pnpm install bnc-onboard
// __layout.svelte
import Onboard from "bnc-onboard";

When I start my development server, I get the following module resolution errors (not all have been included):

pnpm run dev

enter image description here

How can I fix this?

Edit: I tried following these rollup instructions. Since SvelteKit uses Vite, which is based on Rollup, I tried adding the following to svelte.config.js:

import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import nodePolyfills from 'rollup-plugin-node-polyfills'

// ...

export default {
  // ...
  kit: {
    // ...
    vite: {
       plugins: [
            json(),
            resolve({
                browser: true,
                preferBuiltins: true
            }),
            commonjs({
                namedExports: {
                    "u2f-api": ["sign", "isSupported"]
                },
            }),
            nodePolyfills(),
        ],
    },
  },
};

This did not help. I am getting the exact same error.

Edit 2: It appears the bnc-onboard package never installed correctly in the first place. I made another question about this here, and I'll update this question once I fix that.

Edit 3: I got the above solved. Now I'm getting this slightly different error:

enter image description here

Edit 4: I ran pnpm install @keystonehq/bc-ur-registry, I am now getting the following error instead:

enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!