mrvautin / squido

A dead simple static HTML website builder which can be hosted anywhere for super fast websites and very little effort
https://squido.markmoffat.com/
MIT License
63 stars 6 forks source link

New build errors? #18

Closed SeaDude closed 2 years ago

SeaDude commented 2 years ago

Hello,

I have had Squido up and running for a few months now. Recently I'm seeing the build action fail due to new errors. I can't quite tell where the error exists, Squido or Azure DevOps. I haven't changed anything except adding new markdown blog posts.

If you see something that would tell where the issue is occurring, please let me know.

Stack:

Error when building:

...

Using Npm version:
6.14.15

Running 'npm install --unsafe-perm'...

npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.

> esbuild@0.11.10 postinstall /working_dir/node_modules/esbuild
> node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN squido-build-file@1.0.0 No repository field.
npm WARN squido-build-file@1.0.0 No license field.
added 418 packages from 343 contributors and audited 419 packages in 30.168s

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

found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

Running 'npm run build'...

> squido-build-file@1.0.0 build /working_dir
> squido build -c

Cleaned: /working_dir/build
[Building environment: development]
(node:275) UnhandledPromiseRejectionWarning: Error: Input data should be a String
    at MarkdownIt.parse (/working_dir/node_modules/markdown-it/lib/index.js:519:11)
    at MarkdownIt.render (/working_dir/node_modules/markdown-it/lib/index.js:544:36)
    at getMeta (/working_dir/node_modules/squido/lib/common.js:42:26)
    at compilePosts (/working_dir/node_modules/squido/lib/source.js:20:28)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async runBuild (/working_dir/node_modules/squido/cli.js:185:5)
    at async Command.<anonymous> (/working_dir/node_modules/squido/cli.js:51:9)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:275) 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: 1)
(node:275) [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.
Preparing output...

Copying files to destination directory '/ss-oryx/app'...
Done in 1 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.

Done in 35 sec(s).
...
SeaDude commented 2 years ago

Interesting note...

So the error only occurs when adding a blog post.

...

Using Node version:
v14.18.3

Using Npm version:
6.14.15

Running 'npm install --unsafe-perm'...

npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.

> esbuild@0.11.10 postinstall /working_dir/node_modules/esbuild
> node install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN squido-build-file@1.0.0 No repository field.
npm WARN squido-build-file@1.0.0 No license field.

added 418 packages from 343 contributors and audited 419 packages in 31.192s

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

found 1 moderate severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

Running 'npm run build'...

> squido-build-file@1.0.0 build /working_dir
> squido build -c

Cleaned: /working_dir/build
[Building environment: development]
Built: /working_dir/build/powertrip-1/index.html
Built: /working_dir/build/about/index.html
... 
Copied: /working_dir/build/404.ejs
Copied: /working_dir/build/index.ejs
Copied: /working_dir/build/package.json
Copied: /working_dir/build/page.ejs
Copied: /working_dir/build/post.ejs
Copied: /working_dir/build/robots.txt
Copied: /working_dir/build/tag.ejs
...
Minified: /working_dir/build/content/javascripts/site.min.js
Minified: /working_dir/build/content/stylesheets/style.min.css
Built: /working_dir/build/sitemap.xml
Built: /working_dir/build/rss
Built: /working_dir/build/atom
Built: /working_dir/build/json
[Build complete]
Preparing output...

Copying files to destination directory '/ss-oryx/app'...
Done in 2 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.

Done in 38 sec(s).

---End of Oryx build logs---
...
mrvautin commented 2 years ago

It's definitely failing to parse the Markdown content. Would you be able to post the contents of the .md file?

SeaDude commented 2 years ago

It happens with any markdown, even a test.

And just realized what happened...I created the blogpost.md file without the YAML frontmatter! It was just plain markdown.

Eh! Sorry for the false alarm!

mrvautin commented 2 years ago

Thanks for the update. I might write some code to catch that and print a nice/helpful error.