Errors running extension starter kit from clean install
-
Hi,
I clone the repository, npm install, npm start.
It installs jsreport,
I then navigate to localhost:5488. The console shows the following errors:
ERROR in ../jsreport-reports/studio/ReportEditor.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError(11:6) Unknown word
9 |
10 | .listContainer > div {11 | // it somehow shows the horizontal scrollbar even when no needeit, this workaround to hide it
I delete the comments from ReportEditor.css in the node_modules/jsreport-reports/studio folder
But I get the following errors:
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cron-builder' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cronstrue' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'ordinal-number-suffix' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-assets/studio/AssetEditor.js
Module not found: Error: Can't resolve 'react-copy-to-clipboard' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-assets\studio'Any ideas on how to fix?
Thanks
-
I added the packages to the devDependencies in my extension package.json and it fixed the issue. Should I make a pull request to the extension starter kit?
https://github.com/ResponsivePaper/jsreport-responsivepaper-pdf/blob/master/package.json
-
I delete the comments from ReportEditor.css in the node_modules/jsreport-reports/studio folder
yes, this is an issue that we have fixed in master branch of jsreport-reports, not released yet, so that issue will be gone soon and you won't need to delete the comments manually.
But I get the following errors:
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cron-builder' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cronstrue' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'ordinal-number-suffix' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-assets/studio/AssetEditor.js
Module not found: Error: Can't resolve 'react-copy-to-clipboard' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-assets\studio'yes, this is an issue that we have with some extensions that specify its dependencies a bit differently. however you only get this errors on console because the current jsreport-studio-dev that it is specified in the package.json of the extension starter kit is a bit old, that version tries to build all extensions (including the ones from jsreport), instead of just the one that is being developed, that was bad and we changed it in new versions of jsreport-studio-dev (now it builds just the extension that is being developed by default).
i have updated the extension starter kit (updated deps, and some small changes) and you should not have these errors on console anymore when you start a new project.
-
Thanks!