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

Cannot install squido on Ubuntu 22.04 #23

Open JonathanLindsey opened 2 weeks ago

JonathanLindsey commented 2 weeks ago

When I try to install squido on a bare bones (+ git) Ubuntu 22.04 install with sudo npm i -g https://github.com/mrvautin/squido.git it gives me a TON of warnings (more than are shown here) and then gives an error about a syscall to spawn sh.

npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/usr/local/lib/node_modules/squido/node_modules/date-fns/yearsToMonths'
npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, lstat '/usr/local/lib/node_modules/squido/node_modules/date-fns/yearsToQuarters'
npm warn tar TAR_ENTRY_ERROR ENOENT: no such file or directory, open '/usr/local/lib/node_modules/squido/node_modules/date-fns/typings.d.ts'
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice
npm error code ENOENT
npm error syscall spawn sh
npm error path /usr/local/lib/node_modules/squido/node_modules/esbuild
npm error errno -2
npm error enoent spawn sh ENOENT
npm error enoent This is related to npm not being able to find a file.
npm error enoent

Full terminal output part 1

Full terminal output part 2

I have node/npm installed with the snap sudo snap install node --classic but tried other configurations too.

JonathanLindsey commented 2 weeks ago

It is only a problem when I use npm i -g https://github.com/mrvautin/squido.git or npm i -g squido.

I am able to git clone https://mrvautin/squido, build and then install OR use npx squido new and npx squido serve.

Also, I was confused by the How to build a static HTML blog in 10 minutes with squido having # marks before the commands. That made me think npm i -g https://github.com/mrvautin/squido.git needed to be run as root.

mrvautin commented 2 weeks ago

Hi @JonathanLindsey it appears recent changes to npm have caused the global install to no longer work.

I've updated the README file with some npx commands which allow you to run squido without globally installing the package.

Let me know how you go.

JonathanLindsey commented 5 days ago

Thanks. That works.

May I suggest updating the How to build a static HTML blog in 10 minutes with squido blog as well and replace the # marks before the commands with $ like it is in the documentation? (I'd offer a PR but it looks like that repo is private.)