Sumamry
This package relies on tsc as part of it's build command in package.json.
However, typescript is a part of devDependencies, which means it is not pulled in when one runs npm add in another project.
As a result, the build fails with the fails with the following message (on Windows)
'tsc' is not recognized as an internal or external command, operable program or batch file
Reproduction Steps
- Create a new npm package:
npm init
- Add
@chevtek/poker-engine as a dependency: npm add @chevtek/poker-engine
Suggested fix
There are three options you could consider:
- If
build needs to be run when adding this package to another project, then it's likely typescript needs to be included as part of depenencies.
- Alternatively, if you're assuming that consumers of this package should already have
typescript as part of their project, it should be specified that typescript is a part of peerDependencies.
- Alternatively, you could publish this package based on what's in the
build directory (i.e. raw javascript) and include the typings. In this way typescript could be avoided as part of your dependency chain for consumers of this package. To give you a rough idea, consider the approach outlined here.
Additional Notes
I'm going to submit a PR based on option 2.
Sumamry
This package relies on
tscas part of it'sbuildcommand in package.json.However,
typescriptis a part ofdevDependencies, which means it is not pulled in when one runsnpm addin another project.As a result, the build fails with the fails with the following message (on Windows)
Reproduction Steps
npm init@chevtek/poker-engineas a dependency:npm add @chevtek/poker-engineSuggested fix
There are three options you could consider:
buildneeds to be run whenadding this package to another project, then it's likelytypescriptneeds to be included as part ofdepenencies.typescriptas part of their project, it should be specified thattypescriptis a part ofpeerDependencies.builddirectory (i.e. raw javascript) and include the typings. In this waytypescriptcould be avoided as part of your dependency chain for consumers of this package. To give you a rough idea, consider the approach outlined here.Additional Notes
I'm going to submit a PR based on option 2.