Skip to content

webpack.common missing - TypeScript config fails to run on ARM64 Mac #153

Open
@RillJ

Description

@RillJ

I was trying to get the UI running locally on an ARM64 M3 Mac following the contribution instructions. I ran into a couple of issues and wanted to share them here in case there's an easy fix or if others might run into the same.

I followed the steps up to npm run start:web. Everything installed fine (after applying the Puppeteer workaround for ARM64), but when starting the UI, I got:

Cannot find module '../httptoolkit-ui/automation/webpack.common' imported from ../httptoolkit-ui/automation/webpack.dev.ts

Looking at the repo, the file is actually named webpack.common.ts, so I changed the config reference in webpack.dev.ts to point to that instead.

However, after that, I got a new error from Webpack:

SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: The angle-bracket syntax for type assertions, <T>expr, is not supported in type strip mode. Instead, use the 'as' syntax: expr as T.

It seems Webpack doesn't support TypeScript natively in this setup. I didn't want to start modifying the build tooling (like installing ts-node, changing tsconfig.json, etc.) since this code hasn’t been touched in a while, and I’m not deeply familiar with Node.js/TypeScript internals.

Is there a preferred way to run this on newer machines (esp. ARM Macs)? Or could the webpack config be precompiled or default to a .js file to avoid this?

Metadata

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