0

I followed the instructions from here

https://github.com/angular/angular/blob/main/docs/DEVELOPER.md

When i try yarn install i get no errors, but when i use yarn build i get this, see below.

When i tried earlier today on my work computer i got a different error, saying it could not find the referenced file for different packages yet they are there

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".mts" for C:\Users\mike\Documents\GitHub\angular\scripts\build\build-packages-dist.mts
    at new NodeError (node:internal/errors:399:5)
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:99:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:139:38)
    at defaultLoad (node:internal/modules/esm/load:83:20)
    at nextLoad (node:internal/modules/esm/hooks:735:28)
    at load (C:\Users\mike\Documents\GitHub\angular\node_modules\ts-node\dist\child\child-loader.js:19:122)
    at nextLoad (node:internal/modules/esm/hooks:735:28)
    at Hooks.load (node:internal/modules/esm/hooks:380:26)
    at MessagePort.handleMessage (node:internal/modules/esm/worker:165:24)       
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:762:20) {   
  code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
error Command failed with exit code 1.

Im trying to get better at building more opensource projects faster, but i been stuck the whole day. In this case it obviously dont know how to handle .mts. ES modules are new to me.

I tried uninstall all node, re-install nvm. I tried to check if the path looked correct, i tried to install on a different machine. I tried updating microsoft linux subsystem.

Storytellerr
  • 642
  • 3
  • 18
mnglund
  • 1
  • 1
  • You should try the solution for this post https://stackoverflow.com/questions/62096269/cant-run-my-node-js-typescript-project-typeerror-err-unknown-file-extension – David Jun 02 '23 at 08:26

0 Answers0