Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to use components after adding svelteit to my project #3

Open
bhanuone opened this issue Jul 12, 2020 · 1 comment
Open

Not able to use components after adding svelteit to my project #3

bhanuone opened this issue Jul 12, 2020 · 1 comment

Comments

@bhanuone
Copy link

I followed the docs to add svelteit to my project. After installing required packages and configuring the project. it is throwing the following error.

(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
@colorfuldots/svelteit/dist/css/svelteit.min.css (imported by src/App.svelte)
[!] (plugin svelte) ParseError: Identifier is expected
node_modules/@colorfuldots/svelteit/src/ButtonGroup.svelte
27:     vertical-align: middle;
28:
29:     > {
        ^
30:       :global(button:not(:first-child)),
31:       .svelteit-button-group:not(:first-child) > :global(button) {
ParseError: Identifier is expected
    at error (/home/bhanu/app/node_modules/svelte/src/compiler/utils/error.ts:25:16)
    at Parser$1.error (/home/bhanu/app/node_modules/svelte/src/compiler/parse/index.ts:93:3)
    at Object.read_style [as read] (/home/bhanu/app/node_modules/svelte/src/compiler/parse/read/style.ts:21:11)
    at tag (/home/bhanu/app/node_modules/svelte/src/compiler/parse/state/tag.ts:190:27)
    at new Parser$1 (/home/bhanu/app/node_modules/svelte/src/compiler/parse/index.ts:45:12)
    at parse (/home/bhanu/app/node_modules/svelte/src/compiler/parse/index.ts:208:17)
    at compile (/home/bhanu/app/node_modules/svelte/src/compiler/compile/index.ts:79:14)
    at preprocessPromise.then.code (/home/bhanu/app/node_modules/rollup-plugin-svelte/index.js:252:22)

Expected Behavior

It should work with a svelte project.

Actual Behavior

Throwing error during build.

Steps to Reproduce the Problem

Added the following code in root component App.svelte

<script>
  import "@colorfuldots/svelteit/dist/css/svelteit.min.css";
  import { Button } from "@colorfuldots/svelteit";
</script>

<div>
  <Button title="Test button" rounded primary />
</div>

Specifications

  • Version: ^1.0.0-alpha.7
  • Platform: Ubuntu 20.04
  • Subsystem:
@bhanuone bhanuone changed the title Not able to add svelteit to my project Not able to use components after adding svelteit to my project Jul 12, 2020
@hyojin
Copy link

hyojin commented Oct 22, 2020

Hi @bhanuone
I've faced the same issue and it disappeared after I added the preprocess to the config
You can check 1 ~ 3 from the one for sapper https://docs.svelteit.dev/sapper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants