Skip to content

Get local dev server working with modern node #379

Open
@campey

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions