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

PrismJS error #149

Open
bronze opened this issue Apr 2, 2023 · 2 comments · May be fixed by #155
Open

PrismJS error #149

bronze opened this issue Apr 2, 2023 · 2 comments · May be fixed by #155

Comments

@bronze
Copy link

bronze commented Apr 2, 2023

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "_site/blog/fifthpost/index.html" from "./content/blog/fifthpost.md" (via EleventyTemplateError)
[11ty] 2. (./_includes/layouts/post.njk)
[11ty]   EleventyShortcodeError: Error with Nunjucks paired shortcode `css` (via Template render error)
[11ty] 3. template not found: node_modules/prismjs/themes/prism-okaidia.css (via Template render error)

Solved when i did pnpm add -D prismjs

@fernandocanizo fernandocanizo linked a pull request Aug 2, 2023 that will close this issue
@zachleat
Copy link
Member

zachleat commented Jun 1, 2024

So, this is only necessary with pnpm? npm installs prismjs with @11ty/eleventy-plugin-syntaxhighlight

@bronze
Copy link
Author

bronze commented Jun 1, 2024

Hi Zack, just tried this on a fresh install and both pnpm and npm gave me errors.

npm below:

> eleventy-base-blog@8.0.0 start
> npx @11ty/eleventy --serve --quiet

[11ty/eleventy-base-blog] Including drafts.
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "_site/blog/fifthpost/index.html" from "./content/blog/fifthpost.md" (via EleventyTemplateError)
[11ty] 2. (./_includes/layouts/post.njk)
[11ty]   EleventyShortcodeError: Error with Nunjucks paired shortcode `css` (via Template render error)
[11ty] 3. template not found: node_modules/prismjs/themes/prism-okaidia.css (via Template render error)
[11ty]
[11ty] Original error stack trace: Error: template not found: node_modules/prismjs/themes/prism-okaidia.css
[11ty]     at createTemplate (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/environment.js:234:15)
[11ty]     at next (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/lib.js:260:7)
[11ty]     at handle (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/environment.js:267:11)
[11ty]     at /home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/environment.js:276:9
[11ty]     at next (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/lib.js:258:7)
[11ty]     at Object.asyncIter (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/lib.js:263:3)
[11ty]     at Environment.getTemplate (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/environment.js:259:9)
[11ty]     at eval (eval at _compile (/home/bronze/11tytest/node_modules/.pnpm/nunjucks@3.2.4_chokidar@3.6.0/node_modules/nunjucks/src/environment.js:527:18), <anonymous>:14:5)
[11ty]     at fn (/home/bronze/11tytest/node_modules/.pnpm/a-sync-waterfall@1.0.1/node_modules/a-sync-waterfall/index.js:26:24)
[11ty]     at /home/bronze/11tytest/node_modules/.pnpm/a-sync-waterfall@1.0.1/node_modules/a-sync-waterfall/index.js:66:22
[11ty] Wrote 0 files in 0.16 seconds (v2.0.1)

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