Skip to content

UCLALibrary/meap-website-nuxt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

870 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nuxt 3 MEAP Website

Project Tooling

This project is configured to use:

  • Node.js 24.16.0
  • pnpm 11.5.1

The repo pins pnpm through the packageManager field in package.json, so pnpm will be selected automatically when Corepack is enabled.

Setup

Prerequisites

This repository uses:

  • Node.js 24.16.0
  • pnpm 11.5.1

The repository includes:

  • .nvmrc for Node.js version management
  • packageManager in package.json for pnpm version management

With nvm and Corepack configured, developers can switch between repositories without manually managing Node.js or pnpm versions.

First-Time Setup

If you do not already have Node.js 24.16.0 installed:

nvm install 24.16.0

Enable Corepack (one-time setup):

corepack enable

Switch to the project's Node.js version:

nvm use

Install dependencies:

pnpm install

Environment variables

Make sure your local .env file is up to date before running the app locally. Request the latest values from the team if needed.

Running the App

Start the development server

pnpm dev

The app will run at:

http://localhost:3000

Generate static output

pnpm generate

Preview a production build locally

pnpm start

Quality Checks

Lint the project

pnpm lint

Auto-fix lint issues

pnpm lint:fix

Type-check the project

pnpm typecheck

Run the main test command

pnpm test

Cypress Commands

Open Cypress in interactive mode

pnpm cypress

Run Cypress headlessly

pnpm cypress-run

Switching Between Repositories

Different UCLA Library repositories may use different Node versions.

When you switch repositories:

cd <repository>
nvm use
  • nvm use reads the Node version from .nvmrc when present.
  • pnpm is selected automatically through Corepack and the repo’s packageManager field.
  • Run pnpm commands as usual

Troubleshooting

Wrong Node version

Check your active Node version:

node -v

Check installed Node versions:

nvm ls

Switch to the project version:

nvm use 24.16.0

Wrong pnpm version

Check the active pnpm version:

pnpm -v

Enable Corepack if needed:

corepack enable

Refresh your shell cache if pnpm still looks wrong:

hash -r

Check which pnpm is being used:

which -a pnpm

If a globally installed pnpm is interfering, remove it:

npm uninstall -g pnpm
hash -r

Clean reinstall

If dependencies look broken or stale:

rm -rf node_modules .nuxt
pnpm install

Deployment

See the Nuxt deployment documentation for more details:

https://nuxt.com/docs/getting-started/deployment

Global pnpm and Corepack

If you use a global pnpm (for example, pnpm 9)

If you have pnpm installed globally (for example, via Homebrew) and want to use that version for a repository:

  1. Disable Corepack:

    corepack disable
  2. Run your pnpm commands as usual:

    pnpm install

Corepack will no longer intercept the pnpm command, so your globally installed pnpm will be used.


Switching back to a repository that pins its own pnpm version

If you later switch to a repository that uses the packageManager field to pin a specific pnpm version:

  1. Enable Corepack:

    corepack enable
  2. Verify the active pnpm version:

    pnpm --version
  3. If the version does not match the one pinned in the repository's package.json, run:

    corepack use pnpm@<version>

    Replace <version> with the version specified in the repository's packageManager field.

  4. Run your pnpm commands again:

    pnpm install

If you do not have a global pnpm installation

If you do not have pnpm installed globally (for example, via Homebrew), keep Corepack enabled.

When switching between repositories (and Node.js versions managed by nvm), Corepack will automatically use the pnpm version pinned in each repository's packageManager field.

If the required pnpm version is not available locally, run:

corepack use pnpm@<version>

where <version> is the version specified in the repository's packageManager field.

Then continue using pnpm normally:

pnpm install

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 46.0%
  • Vue 41.3%
  • TypeScript 5.7%
  • HTML 4.9%
  • SCSS 2.1%