Skip to content

UCLALibrary/library-website-nuxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,082 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuxt 3 Main Library Website

Look at the Nuxt 3 documentation to learn more.

Setup

❗ Verify that your development environment runs the Node and PNPM versions referenced in the project's actions.yml file

# node
node -v
# pnpm
pnpm -v

If your global Node or PNPM version is different, use the respective version setup steps:

Install the project dependencies:

# pnpm
pnpm install

❗ Make sure local .env is updated before running dev server (Request .env settings from team)

Development Server

Start the development server on http://localhost:3000:

# pnpm
pnpm run dev

Production

Build the application for production:

# pnpm
pnpm run build

Locally preview production build:

# pnpm
pnpm run preview

Check out the deployment documentation for more information.

Addendum

Node Version Setup

  • Verify current version: node -v

  • If the current node verison is different from the project node version, check for other existing versions: nvm list or nvm ls

  • You should/may see an output such as this:

-> v20.18.3
   v22.22.0
   v26.2.0
default -> 20.18.3 (-> v20.18.3 *)
  • Install the project node version if it is not listed: nvm install version-number (Example: nvm install 20.20.2)

  • Verify project version is installed: nvm list or nvm ls

  • Switch to use project node version: nvm use version-number (Example: nvm use 20.20.2)

  • Verify the project version: node -v

💡 To set specific node version as the global default: nvm alias default version-number

PNPM Version Setup

If you are using a different global pnpm version (for example, v10+), you may see this type of error:

ERR_PNPM_UNSUPPORTED_ENGINE
Expected version: ^9.12.1
Got: 10.x.x

Recommended setup: use Corepack

Node.js includes Corepack, which lets different projects use different pnpm versions.

  1. Enable Corepack: corepack enable

  2. Set the correct pnpm version for the project: corepack use pnpm@version-number (Example: corepack use pnpm@9.12.1)

  3. Verify the version: pnpm -v

  4. Run commands as usual:

    pnpm install

    pnpm lint

Important notes

  • Do not downgrade your global pnpm version.
  • Do not remove the engines field.
  • This setup allows different repos to use different pnpm versions safely.

Troubleshooting

If pnpm -v still shows the wrong version, run:

hash -r
which -a pnpm

If a global pnpm is overriding Corepack, remove it:

npm uninstall -g pnpm
hash -r

About

Main public-facing website of the UCLA Library.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors