Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc: @tgolen
Related Issues
GH_LINK: #12
This PR fixes the
build
command specified inpackage.json
.Problem
The "Publish package to npmjs" workflow failed here because of the incompatibility between a TypeScript configuration and an option passed to the TypeScript compiler.
Specifically, the following configuration and option conflicted with each other.
tsconfig.json
:"noEmit": true
package.json
:npx tsc --emitDeclarationOnly
During the build,
--emitDeclarationOnly
instructstsc
(TypeScript compiler) to generate onlyd.ts
files.If you're curious, the actual compilation is handled by babel
However, the
noEmit
option, which is turned on intsconfig.json
, tellstsc
to not to generate anything at all, conflicting with the aboveemitDeclarationOnly
option.Fix
Removes
"noEmit": true
fromtsconfig.json
. This is safe because thets
command inpackage.json
, which is used to type-check, already passes--noEmit
option.Cleanup
Removes the
ts:declarations
command frompackage.json
and directly run thetsc
command inside thebuild
command.Test
Run
npm run build
in the project root directory. Confirm that the command runs without an error and thedist
folder is created.