slidevjs / container Goto Github PK
View Code? Open in Web Editor NEWContainer building scripts for Slidev
License: MIT License
Container building scripts for Slidev
License: MIT License
As the readme says node_modules
folder will make slidev to not lauch
package.json has the same behaviour
I had tried docker images of v0.9.1, v0.8.1, and v0.7.0, the running had been failed.
For v0.9.1(v0.8.1 is the same), it just returens 404.
It starts fine:
docker logs lgy_node
●■▲
Slidev v0.9.1
theme @slidev/theme-default
entry /root/slides/slides.md
slide show > http://localhost:3030/
presenter mode > http://localhost:3030/presenter
remote control > pass --remote to enable
I login into the docker container and query for the web html:
docker exec -ti lgy_node /bin/sh
~/slides # wget http://localhost:3030
Connecting to localhost:3030 (127.0.0.1:3030)
wget: server returned error: HTTP/1.1 404 Not Found
For v0.7.0, when I started the contianer, the log is:
docker logs lgy_node
●■▲
Slidev v0.7.0
theme @slidev/theme-default
entry /root/slides/slides.md
slide show > http://localhost:3030/
presenter mode > http://localhost:3030/presenter
remote control > pass --remote to enable
6:19:33 AM [vite] Internal server error: The request url "/root/node_modules/@slidev/cli/node_modules/@slidev/client/main.ts" is outside of vite dev server root "/root/slides".
For security concerns, accessing files outside of workspace root is restricted since Vite v2.3.x.
Refer to docs https://vitejs.dev/config/#server-fsserveroot for configurations and more details.
at ensureServingAccess (/root/node_modules/vite/dist/node/chunks/dep-c9ea388d.js:57841:15)
at transformRequest (/root/node_modules/vite/dist/node/chunks/dep-c9ea388d.js:57883:17)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async viteTransformMiddleware (/root/node_modules/vite/dist/node/chunks/dep-c9ea388d.js:58069:32)
How to fix these?
Describe the bug
Docker container does not start
To Reproduce
git clone https://github.com/slidevjs/container.git
cd container
docker run -v /home/ph/slides:/root/slides -p 3000:3030 ph/slidev:1
---->>> sh: slidev: Permission denied
The command used to create a container on Mac OS will get an error. Cause the directory .
is invalid. @Stig124 It is better to point out that in README.
$ ls demo
slides.md
$ docker run --rm -v /full/path/of/demo:/root/slides -p 3030:3030 stig124/slidev:latest
Hope that can help.
$ docker pull stig124/slidev:latest
Error response from daemon: mediaType in manifest should be 'application/vnd.docker.distribution.manifest.v2+json' not ''
command:
~/slides # cd /root/
~ # npm i playwright-chromium (work directory should be `/root/`)
~ # cd /root/slides
~/slides # ../node_modules/.bin/slidev export
Got err log:
Slidev v0.9.6
theme @slidev/theme-default
entry /root/slides/slides.md
(node:288) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /root/node_modules/playwright-chromium/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
browserType.launch: Failed to launch: Error: spawn /root/.cache/ms-playwright/chromium-878941/chrome-linux/chrome ENOENT
=========================== logs ===========================
<launching> /root/.cache/ms-playwright/chromium-878941/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-aEEMoK --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.
Error
at Object.captureStackTrace (/root/node_modules/playwright-chromium/lib/utils/stackTrace.js:50:19)
at Connection.sendMessageToServer (/root/node_modules/playwright-chromium/lib/client/connection.js:65:48)
at Proxy.<anonymous> (/root/node_modules/playwright-chromium/lib/client/channelOwner.js:64:61)
at /root/node_modules/playwright-chromium/lib/client/browserType.js:60:67
at BrowserType._wrapApiCall (/root/node_modules/playwright-chromium/lib/client/channelOwner.js:77:34)
at BrowserType.launch (/root/node_modules/playwright-chromium/lib/client/browserType.js:51:21)
at exportSlides (/root/node_modules/@slidev/cli/dist/export-WGBEP3OU.js:62:34)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.handler (/root/node_modules/@slidev/cli/dist/cli.js:212:12)
Hello. Slidev project is really cool and I am appropriate for this.
I found that the container is not working properly because of crlf ending of entrypoint.sh
.
I could manage it by simply changing it to lf ending.
I don't know whether it's because of GitHub commit policy, but I think it would be really helpful if we add some troubleshootings in README.md.
Thank you very much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.