Poimen / stencil-tailwind-plugin

Plugin for using tailwindcss with StencilJS
https://www.npmjs.com/package/stencil-tailwind-plugin
MIT License
51 stars 5 forks source link

Error: Cannot find module 'typescript' Require stack: - #14

Closed flozero closed 2 years ago

flozero commented 2 years ago

Hello using your plugin with the latest stencil core version. 2.12.1

Adding your plugin and here my stencil config:

Screen Shot 2022-01-19 at 3 37 06 PM

but got this error when running npm start after:

Screen Shot 2022-01-19 at 3 37 26 PM

Do you have any idea ?

thank you a lot for your work

Poimen commented 2 years ago

The plugin requires typescript to be installed as a dev dependency in your project.

Can you please check if your package.json has this?

flozero commented 2 years ago

That looks it was the issue. Now having

Screen Shot 2022-01-20 at 1 42 18 AM Screen Shot 2022-01-20 at 1 42 47 AM

I am using your example in the doc with the bare minimum. and here my tailwind

Screen Shot 2022-01-20 at 1 43 10 AM
flozero commented 2 years ago

ok added manually via tailwindConf made it works apparently. I don't know if its the default behavior. But maybe in the doc we should say when somehting is required or not

Poimen commented 2 years ago

Glad it is working.

The plugin doesn't auto detect the config so you have to give it.

I'll look at updating the docs to make it more explicit. Thanks for the feedback 🙂