Skip to content

Commit

Permalink
Revert "Use pnpm instead of npm" (#1382)
Browse files Browse the repository at this point in the history
Reverts #1375

Causes white screen UI Bug, "the way we currently strap everything with
vue2 and vuetify has a lot of footguns in it, and using a newer package
manager where each subdependency gets its own version of node is causing
incorrect dependency resolution which also means we can't fix this
without either updating node or patching those dependencies id say just
revert the PR for now until I or someone else can do the vue3 update"
  • Loading branch information
Juniormunk committed Jul 31, 2024
1 parent 10f74bb commit d1e7fd4
Show file tree
Hide file tree
Showing 9 changed files with 5,286 additions and 3,754 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Dependencies
run: pnpm install
run: npm ci
- name: Build Production Client
run: pnpm run build
run: npm run build
- uses: actions/upload-artifact@v4
with:
name: built-client
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,17 @@ jobs:
working-directory: photon-client
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Dependencies
run: pnpm install
run: npm ci
- name: Check Linting
run: pnpm run lint-ci
run: npm run lint-ci
- name: Check Formatting
run: pnpm run format-ci
run: npm run format-ci
server-index:
name: "Check server index.html not changed"
runs-on: ubuntu-22.04
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/photon-code-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install Dependencies
run: pnpm install
run: npm ci
- name: Build Production Client
run: pnpm run build-demo
run: npm run build-demo
- uses: actions/upload-artifact@v4
with:
name: built-client
Expand Down
18 changes: 13 additions & 5 deletions docs/source/docs/contributing/photonvision/build-instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@ Development Setup
Prerequisites
~~~~~~~~~~~~~

| **Java Development Kit:** This project requires Java Development Kit (JDK) 17 to be compiled. This is the same Java version that comes with WPILib for 2024+. If you don't have this JDK with WPILib, you can follow the instructions to install JDK 17 for your platform `here <https://bell-sw.com/pages/downloads/#jdk-17-lts>`__.
| **Node.js and pnpm** The UI is created using Vue and built using Vite. Node.js is required to develop and build the UI. We recomend using the pnpm package manager to handle dependencies and install Node.js. You can follow the instructions to install pnpm `here <https://pnpm.io/installation>`__. The project is already configured to create a Node.js v18 env when building photon-client.
| **Java Development Kit:** This project requires Java Development Kit (JDK) 17 to be compiled. This is the same Java version that comes with WPILib for 2025+. If you don't have this JDK with WPILib, you can follow the instructions to install JDK 17 for your platform `here <https://bell-sw.com/pages/downloads/#jdk-17-lts>`_.
| **Node JS:** The UI is written in Node JS. To compile the UI, Node 14.18.0 to Node 16.0.0 is required. To install Node JS follow the instructions for your platform `on the official Node JS website <https://nodejs.org/en/download/>`_. However, modify this line
.. code-block:: bash
nvm install 20
so that it instead reads

.. code-block:: javascript
nvm install 14.18.0
Compiling Instructions
----------------------
Expand All @@ -36,7 +46,7 @@ In the photon-client directory:

.. code-block:: bash
pnpm install
npm install
Build and Copy UI to Java Source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -58,8 +68,6 @@ In the root directory:

``gradlew buildAndCopyUI``

Please note that if you installed Node.js via pnpm, this gradle action will mirror Node.js in the gradle workdir and use that instead of the pnpm version.

Build and Run PhotonVision
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion photon-client/.npmrc

This file was deleted.

Loading

0 comments on commit d1e7fd4

Please sign in to comment.