rothsandro / eleventy-notes

A template for Eleventy to publish your personal notes or docs.
https://eleventy-notes.sandroroth.com/
128 stars 15 forks source link

CSS isn't loaded when running npm start #56

Open strombraaten opened 2 hours ago

strombraaten commented 2 hours ago

I've tried troubleshooting quite a bit, but I'm having a hard time understanding how everything fits together.

It seems to me that there's a disconnect somehow between the bundle-css.js file, dist folder, the css folder, app.sky.scss, and line 10 in index.html.

Simens-skjermbilder-29-09-2024-kl17 16

From the console in the browser I get this error:

app.sky.css:1 

       Failed to load resource: the server responded with a status of 404 (Not Found)
reload-client.js:21 [11ty][15:36:48.348 UTC] Connected
reload-client.js:21 [11ty][15:36:53.775 UTC] Connected
reload-client.js:21 [11ty][15:36:54.007 UTC] Connected
app.sky.css:1 

       Failed to load resource: the server responded with a status of 404 (Not Found)

And this is the build log:

> eleventy-notes@0.24.0 start
> npm-run-all clean -p css:watch js:watch 11ty:serve

> eleventy-notes@0.24.0 clean
> rimraf dist

> eleventy-notes@0.24.0 11ty:serve
> eleventy --serve

> eleventy-notes@0.24.0 css:watch
> node scripts/bundle-css.js --watch

> eleventy-notes@0.24.0 js:watch
> node scripts/bundle-js.js --watch

(node:69974) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:69947) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:69920) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[11ty] Writing dist/index.json from ../.app/pages/index.11ty.js
[11ty] Writing dist/404.html from ../.app/pages/404.njk
[11ty] Writing dist/tags/index.html from ../.app/pages/tags.njk
[11ty] Writing dist/search/index.html from ../.app/pages/search.njk
[11ty] Writing dist/n/my-note/index.html from ../My Note.md
[11ty] Writing dist/index.html from ../index.md
[11ty] Wrote 6 files in 0.09 seconds (v2.0.1)
[11ty] Watching…
[11ty] Server at http://localhost:8080/
[11ty] File added: dist/app.js (skips build)
node(69947,0x174647000) malloc: Incorrect checksum for freed object 0x169b72c00: probably modified after being freed.
Corrupt value: 0xa7b00000000
node(69947,0x174a53000) malloc: Incorrect checksum for freed object 0x12cb4dc00: probably modified after being freed.
Corrupt value: 0x0
node(69947,0x174647000) malloc: *** set a breakpoint in malloc_error_break to debug
node(69947,0x174a53000) malloc: *** set a breakpoint in malloc_error_break to debug
rothsandro commented 2 hours ago

Can you reproduce the problem with a clean copy of this repo, without any changes?

strombraaten commented 2 hours ago

Yeah, I've tried three times now, where I delete all the files, except for the .app folder, and still get the same thing.

strombraaten commented 1 hour ago

Just to be completely sure, I also tried creating a new repo now (https://github.com/strombraaten/eleventy-notes), where i used the template. And I get the same errors when running npm install. The last few times I fixed them with npm audit fix, but now I tried just moving along, regardless of the vulnerabilites.

However I get the same errors when I run npm start.

Here's the log, for when I ran it with a new repo, just for the record:

npm install
npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm warn deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead

added 568 packages, and audited 569 packages in 7s

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

10 vulnerabilities (5 moderate, 5 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
% npm audit
# npm audit report

braces  <3.0.3
Severity: high
Uncontrolled resource consumption in braces - https://github.com/advisories/GHSA-grv7-fg5c-xmjg
fix available via `npm audit fix`
node_modules/braces

ejs  <3.1.10
Severity: moderate
ejs lacks certain pollution protection - https://github.com/advisories/GHSA-ghr5-ch3p-vcr6
fix available via `npm audit fix`
node_modules/ejs

micromatch  <4.0.8
Severity: moderate
Regular Expression Denial of Service (ReDoS) in micromatch - https://github.com/advisories/GHSA-952p-6rrq-rcjv
fix available via `npm audit fix`
node_modules/micromatch

msgpackr  <1.10.1
Severity: high
msgpackr's conversion of property names to strings can trigger infinite recursion - https://github.com/advisories/GHSA-7hpj-7hhx-2fgx
fix available via `npm audit fix`
node_modules/msgpackr

nunjucks  <3.2.4
Severity: moderate
Nunjucks autoescape bypass leads to cross site scripting - https://github.com/advisories/GHSA-x77j-w7wf-fjmw
fix available via `npm audit fix`
node_modules/nunjucks

pagefind  <1.1.1
Severity: moderate
DOM clobbering could escalate to Cross-site Scripting (XSS) - https://github.com/advisories/GHSA-gprj-6m2f-j9hx
fix available via `npm audit fix`
node_modules/pagefind

path-to-regexp  4.0.0 - 6.2.2
Severity: high
path-to-regexp outputs backtracking regular expressions - https://github.com/advisories/GHSA-9wv6-86v2-598j
fix available via `npm audit fix`
node_modules/path-to-regexp

pug  <=3.0.2
Severity: moderate
Pug allows JavaScript code execution if an application accepts untrusted input - https://github.com/advisories/GHSA-3965-hpx2-q597
fix available via `npm audit fix`
node_modules/pug

semver  <5.7.2
Severity: high
semver vulnerable to Regular Expression Denial of Service - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
fix available via `npm audit fix`
node_modules/normalize-package-data/node_modules/semver
node_modules/npm-run-all/node_modules/semver

ws  8.0.0 - 8.17.0
Severity: high
ws affected by a DoS when handling a request with many HTTP headers - https://github.com/advisories/GHSA-3h5v-q93c-6h6q
fix available via `npm audit fix`
node_modules/ws

10 vulnerabilities (5 moderate, 5 high)

To address all issues, run:
  npm audit fix
rothsandro commented 1 hour ago

Hm, I can't reproduce it so hard to say what the problem is but it looks like something is wrong on your system if you can reproduce with a clean repo (and without running npm audit fix which may break stuff).

node(69947,0x174647000) malloc: Incorrect checksum for freed object 0x169b72c00: probably modified after being freed. Corrupt value: 0xa7b00000000

I'm not sure if this is related to the parcel bundler or to node itself. What OS + node version do you use and is it possible that your node installation is somehow broken?