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

npm run dev => UnhandledPromiseRejectionWarning #4

Closed
theramenboy opened this issue May 5, 2021 · 6 comments
Closed

npm run dev => UnhandledPromiseRejectionWarning #4

theramenboy opened this issue May 5, 2021 · 6 comments

Comments

@theramenboy
Copy link

theramenboy commented May 5, 2021

Hello, I was so curious about slidev that I jumped in immediately! (✧ω✧)

I have a problem with "npm run dev"
When I execute it I got:


(node:9240) UnhandledPromiseRejectionWarning: Error: Path contains invalid characters: D:\Ramen\Projects\slidev-test/D:/Ramen/Projects/slidev-test/node_modules/.remote-assets
    at checkPath (D:\Ramen\Projects\slidev-test\node_modules\fs-extra\lib\mkdirs\make-dir.js:20:21)
    at module.exports.makeDir (D:\Ramen\Projects\slidev-test\node_modules\fs-extra\lib\mkdirs\make-dir.js:45:3)
    at Object.defineProperty.value (D:\Ramen\Projects\slidev-test\node_modules\universalify\index.js:21:45)
    at Object.configResolved (D:\Ramen\Projects\slidev-test\node_modules\vite-plugin-remote-assets\dist\index.js:351:32)
    at D:\Ramen\Projects\slidev-test\node_modules\vite\dist\node\chunks\dep-2c03f3f9.js:46156:127
    at Array.map (<anonymous>)
    at resolveConfig (D:\Ramen\Projects\slidev-test\node_modules\vite\dist\node\chunks\dep-2c03f3f9.js:46156:35)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async createServer (D:\Ramen\Projects\slidev-test\node_modules\vite\dist\node\chunks\dep-2c03f3f9.js:69168:20)
    at async createServer (D:\Ramen\Projects\slidev-test\node_modules\@slidev\cli\dist\chunk-2DUYQIA7.js:13:18)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9240) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:9240) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

System: Windows10
Node: v14.16.1
Npm: v7.0.5

What I did:

  • npm init slidev
  • choose "slidev-test" as name
  • cd slidev-test
  • npm install
added 225 packages, and audited 225 packages in 22s

30 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
  • npm run dev (and here I got the issue)

It is something that could be on my side to check?
Thanks in advance, kind regards

@antfu
Copy link
Member

antfu commented May 5, 2021

Will have a look and add more tests for Windows 🤣

@antfu
Copy link
Member

antfu commented May 5, 2021

Not sure if 0.1.3 would be a fix, would be appreciated if you can have a try. Don't have a Windows right now for me to test out 🥲

@theramenboy
Copy link
Author

Ok, I've installed the v0.1.3 and "npm run dev" works nicely. (๑˃ᴗ˂)ﻭ

Slidev  v0.1.3

theme   @slidev/theme-seriph
entry   D:\Ramen\Projects\slidev-test\slides.md

slide show      > http://localhost:3030/
presenter mode  > http://localhost:3030/presenter
remote control  > http://172.16.0.11:3030/presenter
remote control  > http://192.168.1.94:3030/presenter

I went on http://localhost:3030/ but it is all blank.
Console side I got this error:

Failed to load resource: the server responded with a status of 404 (Not Found) on http://localhost:3030/@fsD:/Ramen/Projects/slidev-test/node_modules/@slidev/client/main.ts

Thanks again!

@bram-pkg
Copy link
Contributor

bram-pkg commented May 5, 2021

Ok, I've installed the v0.1.3 and "npm run dev" works nicely. (๑˃ᴗ˂)ﻭ

Slidev  v0.1.3

theme   @slidev/theme-seriph
entry   D:\Ramen\Projects\slidev-test\slides.md

slide show      > http://localhost:3030/
presenter mode  > http://localhost:3030/presenter
remote control  > http://172.16.0.11:3030/presenter
remote control  > http://192.168.1.94:3030/presenter

I went on http://localhost:3030/ but it is all blank.
Console side I got this error:

Failed to load resource: the server responded with a status of 404 (Not Found) on http://localhost:3030/@fsD:/Ramen/Projects/slidev-test/node_modules/@slidev/client/main.ts

Thanks again!

Same happening here #7

@antfu antfu closed this as completed in 6a2d9e5 May 5, 2021
@antfu
Copy link
Member

antfu commented May 5, 2021

I end up installing a Windows VM to fix this 😅. Everything should be fine now with 0.1.5.

@theramenboy
Copy link
Author

I end up installing a Windows VM to fix this 😅. Everything should be fine now with 0.1.5.

Tested version 0.1.5 and all works as expected.
Thank you for go wild to fix it! (≧ω≦ )

antfu pushed a commit that referenced this issue Mar 7, 2024
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

3 participants