jaredpalmer / tsdx

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

Failed to install dependencies for an unknown reason #1010

Closed michelbl closed 3 years ago

michelbl commented 3 years ago

Current Behavior

Trying to create a basic package, I get an error:

npx tsdx create --template 'basic' mylib

::::::::::: ::::::::  :::::::::  :::    :::
    :+:    :+:    :+: :+:    :+: :+:    :+:
    +:+    +:+        +:+    +:+  +:+  +:+
    +#+    +#++:++#++ +#+    +:+   +#++:+
    +#+           +#+ +#+    +#+  +#+  +#+
    #+#    #+#    #+# #+#    #+# #+#    #+#
    ###     ########  #########  ###    ###

✔ Who is the package author? · Me Myself
✔ Created mylib
✖ Failed to install dependencies
Error: Command failed with exit code 243: npm install @size-limit/preset-small-lib husky size-limit tsdx tslib typescript --save-dev

    at makeError (/home/michel/.npm/_npx/99d8f6679c19e750/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/home/michel/.npm/_npx/99d8f6679c19e750/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async /home/michel/.npm/_npx/99d8f6679c19e750/node_modules/tsdx/dist/index.js:173:9

However, the command npm install @size-limit/preset-small-lib husky size-limit tsdx tslib typescript --save-dev runs without trouble.

Expected behavior

Either the installation succeeds, or a error message gives information about the cause of the error.

Suggested solution(s)

Make the error message more informative.

Additional context

npm version
{
  npm: '7.9.0',
  node: '15.14.0',
  v8: '8.6.395.17-node.28',
  uv: '1.41.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.3',
  openssl: '1.1.1k+quic',
  cldr: '38.1',
  icu: '68.2',
  tz: '2020d',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}

Your environment

  System:
    OS: Linux 5.4 Ubuntu 18.04.5 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 2.81 GB / 15.30 GB
    Container: Yes
    Shell: 5.4.2 - /bin/zsh
  Browsers:
    Firefox: 87.0
  npmPackages:
    tsdx: ^0.14.1 => 0.14.1 
    typescript: ^4.2.4 => 4.2.4
hegelstad commented 3 years ago

error @size-limit/file@5.0.1: The engine "node" is incompatible with this module. Expected version "^12.0.0 || ^14.0.0 || >=16.0.0". Got "15.14.0"

michelbl commented 3 years ago

Thanks @hegelstad! Could you please explain how you found the error message? Then I plan to close the issue.

hegelstad commented 3 years ago

I am running Macbook Pro M1, I have installed node via brew with apple silicon architecture, when installing tsdx for the first time, I was running node version 15.14.0, which gave me the above error upon running the quick start guide: npx tsdx create mylib.

When I upgraded node by running brew upgrade, everything worked as expected. It seems like node version 16 >= is a hard requirement for the size-limit package.