-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
When running yarn start
in Onlook's built-in terminal, the module resolution fails because Node.js is incorrectly resolving modules from Onlook's application package path (/Applications/Onlook.app/Contents/Resources/app.asar
) instead of the project's node_modules
directory.
Steps to Reproduce
- Open a React/UmiJS project in Onlook
- Open the built-in terminal in Onlook
- Run
yarn start
command - Observe the module resolution error
Expected Behavior
The terminal should resolve modules from the project's node_modules
directory, similar to how external terminals (iTerm2, Terminal.app) work.
Actual Behavior
Module resolution fails with errors like:
Command error detected: Cannot find module '@umijs/preset-react' from '/Applications/Onlook.app/Contents/Resources/app.asar'
The error stack trace shows that Node.js is trying to resolve modules from Onlook's app.asar path instead of the project directory.
Environment
- OS: macOS Ventura 13.7.4
- Onlook Version: 0.2.32
- Project Type: React with UmiJS
- Package Manager: Yarn v1.22.22
Workaround
Running the same command in an external terminal (iTerm2, Terminal.app, etc.) works perfectly without any issues.