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

[BUG] - 启动时就报错ParseError: Unexpected token,怀疑是依赖问题 #447

Open
5 tasks done
981470928 opened this issue Jul 19, 2024 · 0 comments
Open
5 tasks done

Comments

@981470928
Copy link

Describe the bug

(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
virtual:uno.css (imported by "src/App.svelte")
[!] (plugin svelte) ParseError: Unexpected token
node_modules/.pnpm/@ikun-ui[email protected][email protected][email protected]/node_modules/@ikun-ui/button-group/dist/index.svelte
1: <script lang="ts">
2: import type { KButtonGroupProps } from './types';
^
3: import { getPrefixCls, buttonGroupKey } from '@ikun-ui/utils';
4: import { setContext } from 'svelte';
at error (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:14256:16)
at Parser.error (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:14404:3)
at Parser.acorn_error (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:14391:8)
at Object.read_script [as read] (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:9690:10)
at tag (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:13071:27)
at new Parser (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:14352:12)
at parse (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:14529:17)
at Object.compile (/home/svelte/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.cjs:45620:14)
at Object.transform (/home/svelte/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-svelte/index.js:164:28)
at /home/svelte/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:1914:40

Reproduction

http://123.207.254.186:10000/shiguangwu/svelte

System Info

npm version:16.20.2
system: liunx(ubuntu)

packagejson:{
  "name": "svelte-app",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "rollup -c",
    "dev": "rollup -c -w",
    "start": "sirv public --no-clear --host 0.0.0.0 --port 8087"
  },
  "devDependencies": {
    "@ikun-ui/preset": "^0.2.6",
    "@rollup/plugin-commonjs": "^24.0.0",
    "@rollup/plugin-node-resolve": "^15.0.0",
    "@rollup/plugin-terser": "^0.4.0",
    "rollup": "^3.15.0",
    "rollup-plugin-css-only": "^4.3.0",
    "rollup-plugin-livereload": "^2.0.0",
    "rollup-plugin-svelte": "^7.1.2",
    "svelte": "4.2.18",
    "unocss": "^0.57.7"
  },
  "dependencies": {
    "@ikun-ui/core": "^0.2.6",
    "sirv-cli": "^2.0.0",
    "uuid": "^10.0.0"
  }
}

Used Package Manager

npm

Validations

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

1 participant