DEV Community

Discussion on: Publish Storybook components to NPM using Semantic Release and Github Actions

Collapse
 
martinmikusat profile image
Martin Mikušát

Can anyone help me figure out what I'm missing here? The npm build command which is used in the GitHub action creates a build folder.

The dist folder, which is where the package.json defines where the exports come from, is setup inside the tsconfig.json file but I don't see when is that in any way triggered.

Right now, the files I need when I'm importing from the library don't exist. All there is is a build folder with the React app itself.

Collapse
 
lmorado profile image
lmorado

Did you find a solution for this?

Collapse
 
martinmikusat profile image
Martin Mikušát

I did, I looked through the github repository and noticed the npm run build command was replaced by tsc, instead of the original react-scripts build. That's not mentioned in the article.

I don't quite remember if that's all that fixed it though, I think it should. Looking through the repo certainly helped.

Thread Thread
 
sfmskywalker profile image
Sipke Schoorstra

Indeed that helped!
One more thing I had to change was the noEmit setting in "tsconfig.json" to false, as explained here: stackoverflow.com/questions/590557...