riot / cli

Riot.js command line tool
MIT License
46 stars 9 forks source link

Cant use CLI without declaring devDependency #50

Closed Elderberg closed 3 years ago

Elderberg commented 3 years ago

As of version 5.2.1 the pre-compilation of a simple .riot file with this command worked fine:

riot .

In 5.3.0 I have to declare @riotjs/cli as a devDependency despite not using any pre-processors at all, else it will throw a error about missing babel dependencies:

A critical error occurred
Trace: Error: Cannot find module '@babel/preset-typescript'
Require stack:
- C:\Users\xyz\AppData\Roaming\npm\node_modules\@riotjs\cli\node_modules\@babel\core\lib\config\files\plugins.js
- C:\Users\xyz\AppData\Roaming\npm\node_modules\@riotjs\cli\node_modules\@babel\core\lib\config\files\index.js
- C:\Users\xyz\AppData\Roaming\npm\node_modules\@riotjs\cli\node_modules\@babel\core\lib\index.js
- C:\Users\xyz\AppData\Roaming\npm\node_modules\@riotjs\cli\node_modules\@rollup\plugin-babel\dist\index.js
- C:\Users\xyz\AppData\Roaming\npm\node_modules\@riotjs\cli\cli.js

...

I am not using riot.js in a node project and @riotjs/cli was installed via npm globally.

Is there any plan to include these dependencies into the cli directly or is this the devDependency a requirement now?

GianlucaGuarini commented 3 years ago

Fixed in v6.0.5