oslabs-beta / oslabs-beta/TrailGuide
Docker build error with vite, related to existing npm bug
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28
- Forks
- 0
- Avg merge
- 6m
- Merged PRs (30d)
- 1
Description
Description
Vite build will throw an error when building.
Error: Cannot find module @rollup/rollup-linux-arm64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
Current workaround eliminates the error, but means that we are npm installing from package.json instead of package-lock.json, (creating potential versioning issues down the road).
This may be directly solved by a solution to the npm issue, but more research is needed.
Reproduction
run docker build . in the project directory
System information
System:
OS: macOS 15.0.1
CPU: (8) arm64 Apple M1
Memory: 60.73 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.16.0/bin/npm
Browsers:
Chrome: 129.0.6668.91
Safari: 18.0.1
Additional information
No response
👨👧👦 Contributing
- 🙋♂️ Yes, I'd love to make a PR to fix this bug!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with docker build . on the reported ARM64 environment. Inspect the Docker build steps and compare how package.json and package-lock.json are used during dependency installation. Done means the Docker build completes without deleting the lockfile or relying on an unlocked install.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nodejs, typescript, vite
- Domain
- build-system, devops, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100