Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error created by not using targeting platform node correctly #7

Closed
nosferatu500 opened this issue Nov 8, 2021 · 2 comments · Fixed by #6
Closed

Error created by not using targeting platform node correctly #7

nosferatu500 opened this issue Nov 8, 2021 · 2 comments · Fixed by #6
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nosferatu500
Copy link

nodejs - 17.0.1
macOS - 12.0.1

Errors [{ Could not resolve "vm" (use "Platform: api.PlatformNode" when building for node) 0xc006a4baa0 [] <nil>} { Could not resolve "perf_hooks" (use "Platform: api.PlatformNode" when building for node) 0xc006a4bb00 [] <nil>}]

PS: I have two MacBooks with the same configuration & environment. On MacBook 13 everything okay, but on MacBook 16 I got that issue.

@CryogenicPlanet CryogenicPlanet added the good first issue Good for newcomers label Nov 8, 2021
@CryogenicPlanet
Copy link
Owner

Hey thanks for reaching out.

This error is created because esbuild is not able to bundle vm and perf_hooks the way to solve this is using the --externals (-e) flag. If you look at this https://github.com/CryogenicPlanet/depp#example-advanced-usage you should see an example of the usage.

Not entirely sure what is happening between the two MacBooks but I can investigate further and see if there is a related esbuild issue

@CryogenicPlanet
Copy link
Owner

Actually nvm I realized that I wasn't targeting the platform node correctly and will patch this in a newer version should fix these external problems. My bad

@CryogenicPlanet CryogenicPlanet changed the title Error on first start. Error created by not using targeting platform node correctly Nov 8, 2021
@CryogenicPlanet CryogenicPlanet added the bug Something isn't working label Nov 8, 2021
CryogenicPlanet added a commit that referenced this issue Nov 8, 2021
CryogenicPlanet added a commit that referenced this issue Nov 8, 2021
CryogenicPlanet added a commit that referenced this issue Nov 8, 2021
CryogenicPlanet added a commit that referenced this issue Nov 8, 2021
CryogenicPlanet added a commit that referenced this issue Nov 8, 2021
🔖 v0.0.9

🐛 Returns errors properly and patch request handling

🐛 Fix CI env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants