-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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
- Go to the root of the project on the
developbranch. - Ensure
package-lock.jsonis present. - Run
npm i. - Run
npm run build:all. - See the error
Error: Cannot find module @rollup/rollup-linux-x64-gnuduring the build of the@google-psat/cli-dashboardpackage.
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.
- Go to the root of the project on the
developbranch. - Run
git clean -dfxto remove thenode_modulesdirectory and other untracked files. - Run
rm package-lock.jsonto delete the lock file. - Run
npm ito perform a clean installation of dependencies. - Run
npm run build:all. - See the error
"ReactP5Wrapper" is not exported by "node_modules/@p5-wrapper/react/..."during the build of the@google-psat/extensionpackage.
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.jsonis not removed:
- After removing
package-lock.jsonandnode_modulesand runningnpm iagain:
- Here's the entire log file for reference:
2025-09-17-18-14-00-psat-build-issue.html
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
Type
Projects
Status