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.
Sumamry
This package relies on
tsc
as part of it'sbuild
command in package.json.However,
typescript
is a part ofdevDependencies
, which means it is not pulled in when one runsnpm add
in another project.As a result, the build fails with the fails with the following message (on Windows)
Reproduction Steps
npm init
@chevtek/poker-engine
as a dependency:npm add @chevtek/poker-engine
Suggested fix
There are three options you could consider:
build
needs to be run whenadd
ing this package to another project, then it's likelytypescript
needs to be included as part ofdepenencies
.typescript
as part of their project, it should be specified thattypescript
is a part ofpeerDependencies
.build
directory (i.e. raw javascript) and include the typings. In this waytypescript
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.