jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.2k stars 505 forks source link

Symlink issue: Straight out of the box: `(babel plugin) SyntaxError:` `Unexpected token, expected "," (1:21)` #1126

Open ackvf opened 2 years ago

ackvf commented 2 years ago

Current Behavior

Straight out of the box, I get the following error in \src\index.ts file.

(babel plugin) SyntaxError: C:\Users\Qwerty\repos\nnn\src\index.ts: Unexpected token, expected "," (1:21)

> 1 | export const sum = (a: number, b: number) => {
    |                      ^
  2 |   if ('development' === process.env.NODE_ENV) {
  3 |     console.log('boop');
  4 |   }

image

Expected behavior

I should be able to run yarn or npm i command. Both fail the same way.

Your environment

  System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 14.14 GB / 31.71 GB
  Binaries:
    Node: 16.13.0 - ~\AppData\Local\nvs\default\node.EXE
    Yarn: 1.22.17 - ~\AppData\Local\nvs\default\yarn.CMD
    npm: 8.1.0 - ~\AppData\Local\nvs\default\npm.CMD
  Browsers:
    Chrome: 99.0.4844.82
    Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.46)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    tsdx: ^0.14.1 => 0.14.1
    typescript: ^4.6.2 => 4.6.2
ackvf commented 2 years ago

Problem solved! It is caused by a symbolic link for my repos folder.

C:\>dir
 Directory of C:\

27.09.2018  20:07    <JUNCTION>     repos [C:\Users\Qwerty\repos]

When I run yarn or npm i from C:\Users\Qwerty\repos\nnn>npm i I get no errors.

Damn, I wish this has worked from C:\repos.