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

Get local dev server working with modern node #379

Open
campey opened this issue Sep 11, 2024 · 1 comment
Open

Get local dev server working with modern node #379

campey opened this issue Sep 11, 2024 · 1 comment

Comments

@campey
Copy link

campey commented Sep 11, 2024

Describe the bug
Trying to follow the readme on various systems results in error messages.

To Reproduce Machine 1
Steps to reproduce the behavior on my macbook air:

  1. Go to 'https://github.com/microsoft/pxt-maker/'
  2. Follow Local Dev Server steps in readme.md
  3. Ignore lots of warnings and get to step 8
  4. See error
....
npm error path /Users/campey/Code/microsoft/pxt-maker/node_modules/usb
npm error command failed
npm error command sh -c prebuild-install --runtime napi --verbose || node-gyp rebuild
...

Notes
Seems to be a cpp syntax/versioning issue with the older usb module, which is deprecated and we should probably replace anyway.

Node 16.20.2 "worked" enough to be able to pxt serve and see the page, then updating devDependencies to  "@types/node": "16.18.108" got it to the point where I could see the sim too!

To Reproduce Machine 2
Steps to reproduce the behavior on @Max9403's Windows desktop:

  1. Go to 'https://github.com/microsoft/pxt-maker/'
  2. Follow Local Dev Server steps in readme.md
  3. Get to step pxt builddaldts
  4. See error
...
error: sim/tsconfig.json expected compilerOptions.outFile:"../built/sim.js", got "undefined"

Notes
... but it then serves on the MS machine.

Expected behavior
Build should complete without error.

Desktop:

  • i7 14700k
  • Windows 11

Laptop:

  • Apple M2 2022
  • OS: 14

Additional context
@Max9403, @apead and I are going to be hacking away at this, just raising the issue for visibility & collaboration.

@campey
Copy link
Author

campey commented Sep 12, 2024

removed webusb from package.json
npm install worked this time!
 
And served.
 
Do we need webusb in pxt-maker?
I can't find references in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant