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

Navigation bar disappear and Code highlight doesn't work #704

Closed
Crowds21 opened this issue Sep 6, 2022 · 9 comments
Closed

Navigation bar disappear and Code highlight doesn't work #704

Crowds21 opened this issue Sep 6, 2022 · 9 comments

Comments

@Crowds21
Copy link

Crowds21 commented Sep 6, 2022

Describe the bug
The button still works, but the navigation bar doest not display.
Highlighting a specific line of a code block does not work.
These functions can be used normally in v0.34.2

To Reproduce
npm init slidev@latest
npm run dev

Desktop (please complete the following information):

  • OS: Macos
  • Browser: Edge and Safari
  • Slidev version: v0.35.6
@Bruce-Ming
Copy link

Bruce-Ming commented Sep 7, 2022

me too

{
"name": "share",
"private": true,
"scripts": {
"build": "slidev build",
"dev": "slidev --open",
"export": "slidev export"
},
"dependencies": {
"@slidev/cli": "^0.35.6",
"@slidev/theme-default": "",
"@slidev/theme-seriph": "
"
}
}

Possible dependency issues?
Issues with peer dependencies found
.
└─┬ @slidev/cli
└─┬ @slidev/client
└─┬ @vueuse/motion
└── ✕ unmet peer @nuxt/kit@npm:@nuxt/kit-edge@latest: found 3.0.0-rc.10-27708028.1ca294e

[Vue warn]: Failed to resolve component: carbon:stop-outline
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
image

@welcoMattic
Copy link

Same here, it breaks from 0.35.0

@LAWTED
Copy link

LAWTED commented Sep 8, 2022

me too, but 0.35.4 works well

@twitwi
Copy link
Contributor

twitwi commented Sep 9, 2022

I can reproduce the issue (linux, firefox) for the bar, the code highlighting seems to work.

  • if I remove css: unocss in the frontmatter, the bar is displayed but with no icons
  • the icons that are in the first slide (not in the navbar) are working well though
  • a project upgraded to a latest version is working well (incl. the navbar) also... but I cannot find a notable difference I forgot a lock file

@twitwi
Copy link
Contributor

twitwi commented Sep 9, 2022

The first console warnings that are abnormal are about __DEV__, __SLIDEV_FEATURE_DRAWINGS__ etc not found

image

@tonai As you worked on the build part, maybe you're familiar with these kind of errors? (although these are in dev mode)

@tonai
Copy link
Contributor

tonai commented Sep 9, 2022

Hum environment variables should be replaced by the build tool.
The plugin responsible for this is defined in that file: https://github.com/slidevjs/slidev/blob/main/packages/slidev/node/plugins/patchTransform.ts
And the environment variables are defined in the getDefine method located in that file: https://github.com/slidevjs/slidev/blob/main/packages/slidev/node/plugins/extendConfig.ts
It only transforms file with the .vue extension.
I don't really know why this is broken...

@twitwi
Copy link
Contributor

twitwi commented Sep 9, 2022

I confirm it break by switching from 0.34.3 to 0.35.0, which seems to be only made of an upgrade to vite3.

@twitwi
Copy link
Contributor

twitwi commented Sep 9, 2022

But no issue when running the demo presentation with a clone and build of v0.35.6 (or any version probably).

@antfu antfu closed this as completed in 596f2ce Sep 12, 2022
@Crowds21
Copy link
Author

I can reproduce the issue (linux, firefox) for the bar, the code highlighting seems to work.

Now I am using v0.36.4. The navigation bar works well. But Line Highlighting still can't work.
Sorry, I didn't express the issue accurately.

This is the picture for http://127.0.0.1:3030/4
image
And it is the same result for http://127.0.0.1:3030/4?clicks=1

The Line Highlighting doesn't work for ts {all|2|1-6|9|all}. It highlights all lines all the time .

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

6 participants