jorgegorka / svelte-router

Svelte Router adds routing to your Svelte apps. It's designed for Single Page Applications (SPA). Includes localisation, guards and nested layouts.
MIT License
511 stars 42 forks source link

Failed to load node_modules/svelte-router-spa/src/components/navigate.svelte #95

Open nezlicodes opened 3 years ago

nezlicodes commented 3 years ago

I am having troubles with my build. I keep getting this error message:

[snowpack] ! installing dependencies...
[snowpack] Failed to load node_modules/svelte-router-spa/src/components/navigate.svelte
  Try installing rollup-plugin-svelte and adding it to Snowpack (https://www.snowpack.dev/#custom-rollup-plugins)
[snowpack] Install failed.

Here is my snowpack.config.js file


module.exports = {
  plugins: ['@snowpack/plugin-webpack', '@snowpack/plugin-svelte'],
  installOptions: {
    rollup: { plugins: [require('rollup-plugin-svelte')()] }
  },
  extends: '@snowpack/app-scripts-svelte',
  proxy: {
    '/api': 'http://localhost:3000/api',
  },
  devOptions: {
    out: 'dist/',
    port: 4242,
  },
  buildOptions: {
    baseUrl: 'dist/',
  },
  alias: {
    '@components': './src/components',
    '@state': './src/state',
    '@features': './src/features',
    '@models': './src/models',
    '@themes': './src/themes',
  },
}

Am I doing this wrong? Thanks in advance for your help.

Versions : "rollup-plugin-svelte": "^7.0.0". "snowpack": "^2.18.4". "svelte-router-spa": "^5.8.3"

jorgegorka commented 3 years ago

Hi @nezlicodes

I haven't used snowpack in any project yet so I'm not sure what the problem could be.

Could it be just an order issue and you need to have installOptins before plugins ? Just guessing.