Cannot install Hugo-Plate theme due to missing modules

Hi,
I am on Mac OS 14.3. I have very limited programming and computer science skills.
I have followed the steps required on the theme github page to install the hugo-plate theme.
I have installed all the prerequisite applications today : go, nodes.

$ npm run project-setup to create the hugo-plate directory
But got this error message :

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/coraliediatkine/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/coraliediatkine/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/coraliediatkine/.npm/_logs/2024-10-23T16_23_34_336Z-debug.log

I checked on stack-overflow forum, and tried to update npm, with this command : $ npm install -g npm. It seems that I had a permission issue.
I used $ sudo chown -R $USER /usr/local/lib/node_modules and was asked for my password.
Then used $ npm install -g npm

I got the following

/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
npm WARN notsup Unsupported engine for npm@10.9.0: wanted: {"node":"^18.17.0 || >=20.5.0"} (current: {"node":"12.16.3","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: npm@10.9.0

+ npm@10.9.0
added 133 packages from 25 contributors, removed 325 packages and updated 110 packages in 6.002s
MBPdecoralie2:~ coraliediatkine$ npm run project-setup
internal/modules/cjs/loader.js:960
  throw err;
  ^

Error: Cannot find module 'node:path'
Require stack:
- /usr/local/lib/node_modules/npm/lib/cli.js
- /usr/local/lib/node_modules/npm/bin/npm-cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/cli.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/npm/lib/cli.js',
    '/usr/local/lib/node_modules/npm/bin/npm-cli.js'
  ]
}

I cannot figure out what is wrong.
Thank you for your help.

Did you clone the repository before typing “npm run project-setup”?

This works great:

git clone https://github.com/zeon-studio/hugoplate
cd hugoplate/
npm run project-setup
npm install
npm run dev

Hi,
Thank you for your reply.
I don’t think I did.
I have a least managed to install npm, which seemed to have been an issue, via this command lines :

https://nodejs.org/en/download/package-manager

# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

# download and install Node.js (you may need to restart the terminal)
nvm install 20

# verifies the right Node.js version is in the environment
node -v # should print `v20.18.0`

# verifies the right npm version is in the environment
npm -v # should print `10.8.2`

I will certainly use your advice, and will let you know if it worked.
Best

It worked.
Thank you so much!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.