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

build/emoji.js fails in Windows #2290

Closed
trusktr opened this issue Oct 22, 2023 · 3 comments · May be fixed by #2291
Closed

build/emoji.js fails in Windows #2290

trusktr opened this issue Oct 22, 2023 · 3 comments · May be fixed by #2291
Milestone

Comments

@trusktr
Copy link
Member

trusktr commented Oct 22, 2023

Bug Report

Steps to reproduce

D:\src\docsifyjs+docsify> node build/emoji.js 
Build emoji
- Fetching emoji data from https://api.github.com/emojis
- Retrieved 1877 emoji entries
- Error: Cannot read properties of null (reading '1')
- ```

#### Current behaviour

fail
#### Expected behaviour

pass

#### Other relevant information

- Docsify version: develop
- Your OS: Windows
- Node.js version: 20.5.0
- npm/yarn version: npm 10.2.0
- Browser version: N/A



#### Please create a reproducible sandbox

#### Mention the docsify version in which this bug was not present (if any)
@trusktr
Copy link
Member Author

trusktr commented Oct 22, 2023

After making the change in

I can see the full error in the output, and the script no longer exits with 0 after the error (it should exit non-zero if there's an error):

PS D:\src\lume+lume\packages\docsifyjs+docsify> node .\build\emoji.js
Build emoji
- Fetching emoji data from https://api.github.com/emojis
- Retrieved 1877 emoji entries
file:///D:/src/lume+lume/packages/docsifyjs+docsify/build/emoji.js:47
  const emojiMarkdownStart = emojiMatch[1].trim();
                                       ^

TypeError: Cannot read properties of null (reading '1')
    at writeEmojiPage (file:///D:/src/lume+lume/packages/docsifyjs+docsify/build/emoji.js:47:40)
    at file:///D:/src/lume+lume/packages/docsifyjs+docsify/build/emoji.js:101:3
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.5.0

@trusktr
Copy link
Member Author

trusktr commented Oct 22, 2023

I updated the PR so it also fixes the Windows issue. I'm not sure exactly how the issue happens, but I think it might be due to git settings.

I think that the other PR,

may prevent the CRLFs from popping in unexpectedly, but no harm in making the regex more robust just in case the CRLFs get in there somehow.

@jhildenbiddle jhildenbiddle added this to the 5.x milestone Mar 2, 2024
@jhildenbiddle
Copy link
Member

@trusktr --

Can we close this now that #2288 and #2436 have been merged?

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

Successfully merging a pull request may close this issue.

2 participants