Skip to content

Local Build Fails on develop Branch with multiple errors #1151

@gagan0123

Description

@gagan0123

Describe the bug
The local build process fails with two different errors depending on whether the package-lock.json file is present. When the lockfile exists, the build fails because it cannot find the optional rollup dependency @rollup/rollup-linux-x64-gnu. After removing the lockfile and reinstalling dependencies, the build fails again, but this time with an error stating that ReactP5Wrapper is not a named export of the @p5-wrapper/react package.

To Reproduce
Steps to reproduce the behavior:

Scenario 1: Build failure with package-lock.json

  1. Go to the root of the project on the develop branch.
  2. Ensure package-lock.json is present.
  3. Run npm i.
  4. Run npm run build:all.
  5. See the error Error: Cannot find module @rollup/rollup-linux-x64-gnu during the build of the @google-psat/cli-dashboard package.

Scenario 2: Build failure after a clean install

Note: Tried this step since we introduced vite, this was how I was having to build the extension locally, as this is a known issue in vite, but now, even that is failing.

  1. Go to the root of the project on the develop branch.
  2. Run git clean -dfx to remove the node_modules directory and other untracked files.
  3. Run rm package-lock.json to delete the lock file.
  4. Run npm i to perform a clean installation of dependencies.
  5. Run npm run build:all.
  6. See the error "ReactP5Wrapper" is not exported by "node_modules/@p5-wrapper/react/..." during the build of the @google-psat/extension package.

Expected behavior
The npm run build:all command should complete successfully without any build errors, regardless of whether it's a fresh installation or an install using the existing package-lock.json.

Screenshots

  • When package-lock.json is not removed:
Image
  • After removing package-lock.json and node_modules and running npm i again:
Image

Desktop (please complete the following information):
 - OS: Linux (tested on amd64 and arm64 architectures)
 - Browser: [Not applicable]
 - Version: Node.js v20.19.5

Additional context
These steps were tested in a clean environment. The git clean -dfx command was used to ensure all untracked files and node_modules directories, even within nested packages, were completely removed before attempting a fresh install.

The issue has been reproduced on two different machine architectures (amd64 and arm64). The first error (@rollup/rollup-linux-x64-gnu not found) appears to be related to an npm issue with optional dependencies, while the second error (ReactP5Wrapper not exported) suggests a code or dependency versioning issue.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In QA

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions