question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`react-with-storybook` template installs ~1000 direct dependencies

See original GitHub issue

hi folks, coming back to tsdx after a long absence 😃

Current Behavior

when i do npx tsdx create mylib and pick the react-storybook template, the resulting project installs every single transitive dependency as a dependency of the scaffolded project. i’m preettty sure this is wrong

Expected behavior

a much cleaner package.json

Suggested solution(s)

i’m not sure what causes this yet, but i’m pretty sure this is unintentional…

Your environment

Software Version(s)
TSDX 0.13.2
TypeScript 3.9
npm/Yarn npm 6.14
Node 12.18
Operating System macos

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sw-yxcommented, Jul 18, 2020

hmm @agilgur5 i just tried it on my personal machine and got what you got. very strange. this could be a weird bug on my work machine. i will close for now until i can repro.

0reactions
agilgur5commented, Jul 18, 2020

I was unable to reproduce this:

Repro logs:
$ npx tsdx create mylib

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

✔ Choose a template · react-with-storybook
✔ Created mylib
✔ Installed dependencies

  Awesome! You're now ready to start coding.
  
  I already ran yarn install for you, so your next steps are:
    cd mylib
  
  To start developing (rebuilds on changes):
    yarn start
  
  To build for production:
    yarn build

  To test your library with Jest:
    yarn test
    
  Questions? Feedback? Please let me know!
  https://github.com/jaredpalmer/tsdx/issues

$ cd mylib/
$ cat package.json 
{
  "version": "0.1.0",
  "license": "MIT",
  "main": "dist/index.js",
  "typings": "dist/index.d.ts",
  "files": [
    "dist",
    "src"
  ],
  "engines": {
    "node": ">=10"
  },
  "scripts": {
    "start": "tsdx watch",
    "build": "tsdx build",
    "test": "tsdx test --passWithNoTests",
    "lint": "tsdx lint",
    "prepare": "tsdx build",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook"
  },
  "peerDependencies": {
    "react": ">=16"
  },
  "husky": {
    "hooks": {
      "pre-commit": "tsdx lint"
    }
  },
  "prettier": {
    "printWidth": 80,
    "semi": true,
    "singleQuote": true,
    "trailingComma": "es5"
  },
  "name": "mylib",
  "author": "Anton Gilgur",
  "module": "dist/mylib.esm.js",
  "devDependencies": {
    "@babel/core": "^7.10.5",
    "@storybook/addon-actions": "^5.3.19",
    "@storybook/addon-docs": "^5.3.19",
    "@storybook/addon-info": "^5.3.19",
    "@storybook/addon-links": "^5.3.19",
    "@storybook/addons": "^5.3.19",
    "@storybook/react": "^5.3.19",
    "@types/react": "^16.9.43",
    "@types/react-dom": "^16.9.8",
    "babel-loader": "^8.1.0",
    "husky": "^4.2.5",
    "react": "^16.13.1",
    "react-docgen-typescript-loader": "^3.7.2",
    "react-dom": "^16.13.1",
    "react-is": "^16.13.1",
    "ts-loader": "^8.0.1",
    "tsdx": "^0.13.2",
    "tslib": "^2.0.0",
    "typescript": "^3.9.7"
  }
}

The install code is quite simple, so I wouldn’t suspect a bug coming from here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`react-with-storybook` template installs ~1000 direct ... - GitHub
hi folks, coming back to tsdx after a long absence :) Current Behavior when i do npx tsdx create mylib and pick the...
Read more >
Install Storybook
Storybook will look into your project's dependencies during its install process and provide you with the best configuration available.
Read more >
From my experience, it's really great to work with and definitely ...
The dependencies are needed by people developing WITH React Native as opposed to devDependencies (which are for people developing ON React Native). So...
Read more >
How to build a component library with React and Storybook
Storybook runs outside of our application; therefore, we can develop UI components in isolation without worrying about any project dependencies and requirements ...
Read more >
intro-storybook-react-template - npm package - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: No.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found