pascalw / dashbling

Hackable React based dashboards for developers, inspired by Dashing.

Home Page:https://dashbling.fly.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot run any dashboard

kivancsahici opened this issue · comments

Hi,

yarn create @dashbling/dashboard my-dashboard
cd my-dashboard
yarn build

When I follow the steps above, I get the errors below.

C:\my-dashboard>yarn build
yarn run v1.19.2
$ dashbling compile
2019-12-15T15:49:17+0100 [warn] No authToken was specified, using random token 8nOibyg1sXsqRVpHzImqJRSho8Y for authentication.
clean-webpack-plugin: C:\my-dashboard\dist has been removed.

WARNING: We noticed you're using the useBuiltIns option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the corejs option.

You should also be sure that the version you pass to the corejs option matches the version specified in your package.json's dependencies section. If it doesn't, you need to run one of the following commands:

npm install --save core-js@2 npm install --save core-js@3
yarn add core-js@2 yarn add core-js@3

Hash: be3db5ebf8f249d18d66
Version: webpack 4.41.2
Time: 3633ms
Built at: 12/15/2019 15:49:21
Asset Size Chunks Chunk Names
97025f3ec401d05a930d91c13bbc6b41.svg 682 bytes [emitted]
app.be3db5ebf8f249d18d66.js 3.88 KiB 0 [emitted] [immutable] app
d5a64f51f837c64364059115fb78094a.svg 1 KiB [emitted]
index.html 405 bytes [emitted]
vendorsapp.be3db5ebf8f249d18d66.js 40.5 KiB 1 [emitted] [immutable] vendorsapp
Entrypoint app = vendors~app.be3db5ebf8f249d18d66.js app.be3db5ebf8f249d18d66.js
[0] ./node_modules/react/index.js 190 bytes {1} [built]
[2] ./node_modules/@dashbling/client/Widget.js 373 bytes {1} [built] [failed] [1 error]
[3] ./node_modules/@dashbling/client/dashbling.js + 37 modules 66.3 KiB {1} [built]
| ./node_modules/@dashbling/client/dashbling.js 2.27 KiB [built]
| ./node_modules/react-redux/es/index.js 229 bytes [built]
| ./node_modules/@dashbling/client/store.js 920 bytes [built]
| ./node_modules/react-redux/es/components/Provider.js 2.34 KiB [built]
| ./node_modules/react-redux/es/components/connectAdvanced.js 13.5 KiB [built]
| ./node_modules/redux/es/index.js 1.05 KiB [built]
| ./node_modules/react-redux/es/connect/connect.js 4.83 KiB [built]
| ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js 204 bytes [built]
| ./node_modules/react-redux/es/utils/PropTypes.js 428 bytes [built]
| ./node_modules/react-redux/es/utils/warning.js 640 bytes [built]
| ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js 192 bytes [built]
| ./node_modules/@babel/runtime/helpers/esm/extends.js 397 bytes [built]
| ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js 350 bytes [built]
| ./node_modules/react-redux/es/utils/Subscription.js 2.36 KiB [built]
| ./node_modules/react-redux/es/utils/shallowEqual.js 676 bytes [built]
| + 23 hidden modules
[10] ./node_modules/@dashbling/client/components/Dashboard.js 388 bytes {1} [built] [failed] [1 error]
[11] ./node_modules/@dashbling/client/components/Flex.js 330 bytes {1} [built] [failed] [1 error]
[15] ./node_modules/@dashbling/client/index.js 398 bytes {1} [built] [failed] [1 error]
[20] ./node_modules/@dashbling/client/components/index.js 72 bytes {1} [built]
[21] ./node_modules/@dashbling/client/widgets/index.js 66 bytes {1} [built]
[22] ./node_modules/dashbling-widget-weather/WeatherWidget.js 362 bytes {1} [built] [failed] [1 error]
[23] multi ./index.js 28 bytes {0} [built]
[24] ./styles/main.scss 1.3 KiB {0} [built]
[25] ./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/lib??ref--5-2!./node_modules/sass-loader/lib/loader.js!./styles/main.scss 937 bytes {0} [built]
[27] ./node_modules/style-loader/lib/addStyles.js 9.24 KiB {1} [built]
[44] ./node_modules/timezone/Europe/Amsterdam.js 6 KiB {1} [built]
[45] ./index.js + 4 modules 2.99 KiB {0} [built]
| ./index.js 218 bytes [built]
| ./Dashboard.js 1.13 KiB [built]
| ./widgets/HelloWidget.js 488 bytes [built]
| ./widgets/gitHubStars/GitHubStars.js 607 bytes [built]
| ./widgets/circleCi/CircleCiStatus.js 547 bytes [built]
+ 31 hidden modules

ERROR in ./node_modules/@dashbling/client/widgets/Image.js 12:4
Module parse failed: Unexpected token (12:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export const Image = props => {
| return (

<Widget style={Object.assign({}, styles, props.style)}>

| <img src={props.src} style={{ maxWidth: "100%", maxHeight: "100%" }} />
|
@ ./node_modules/@dashbling/client/widgets/index.js 2:0-32 2:0-32
@ ./Dashboard.js
@ ./index.js
@ multi ./index.js

ERROR in ./node_modules/@dashbling/client/index.js 14:4
Module parse failed: Unexpected token (14:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export const render = (rootElement, DashboardComponent) => {
| ReactDOM.render(

<Provider store={store}>

|
| ,
@ ./index.js 1:0-47 4:0-15
@ multi ./index.js

ERROR in ./node_modules/dashbling-widget-weather/WeatherWidget.js 15:4
Module parse failed: Unexpected token (15:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| return (

<Widget className={styles.widget} {...restProps} href={url}>

| {title}
|
@ ./Dashboard.js 8:0-57 11:54-67
@ ./index.js
@ multi ./index.js

ERROR in ./node_modules/@dashbling/client/widgets/Clock.js 32:6
Module parse failed: Unexpected token (32:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| render() {
| return (

  <Widget style={{ backgroundColor: this.props.backgroundColor }}>

| {this.formatDate(this.state.time)}
|
@ ./node_modules/@dashbling/client/widgets/index.js 1:0-32 1:0-32
@ ./Dashboard.js
@ ./index.js
@ multi ./index.js

ERROR in ./node_modules/@dashbling/client/components/Dashboard.js 9:4
Module parse failed: Unexpected token (9:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const MetaContainer = props => {
| return (

<div className={props.layout.metaContainer}>

|
|
@ ./node_modules/@dashbling/client/components/index.js 1:0-40 1:0-40
@ ./Dashboard.js
@ ./index.js
@ multi ./index.js

ERROR in ./node_modules/@dashbling/client/Widget.js 9:4
Module parse failed: Unexpected token (9:4)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const bgImage = image => {
| return (

<div

| style={{ backgroundImage: url(${image}) }}
| className={styles.bgImage}
@ ./widgets/circleCi/CircleCiStatus.js 2:0-75 9:29-35 15:25-35 15:76-87
@ ./Dashboard.js
@ ./index.js
@ multi ./index.js

ERROR in ./node_modules/@dashbling/client/components/Flex.js 9:9
Module parse failed: Unexpected token (9:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| export const Flex = props => {

return

{props.children}
;
| };
|
@ ./node_modules/@dashbling/client/components/index.js 2:0-30 2:0-30
@ ./Dashboard.js
@ ./index.js
@ multi ./index.js
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 533 KiB 0
Entrypoint undefined = index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 494 bytes {0} [built]
[1] ./node_modules/lodash/lodash.js 528 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Hi @kivancsahici this looks like an issue with running Dashbling on Windows. It looks like Webpack is not able to compile some dependencies, I'm guessing due to how we handle paths in the webpack configuration.

I don't have a Windows environment to debug this on. Could you maybe try running Dashbling from Bash on Windows?

Hi @pascalw I tried with Git Bash. However, the result is the same, unfortunately

Ok @kivancsahici thanks for trying that. I'll try to find a Windows environment to debug this on later this week.

Hi @kivancsahici I've fixed the issue (and another Windows compatibility issue too) and released a new beta version. Could you try if this resolves the issue for you too?

You can try the beta by applying the following changes to your package.json and installing the updated packages:

   "main": "index.js",
   "license": "MIT",
   "scripts": {
-    "start": "NODE_ENV=${NODE_ENV:-development} dashbling start",
+    "start": "dashbling start",
     "build": "dashbling compile"
   },
   "browserslist": "last 2 versions",
   "devDependencies": {
-    "@dashbling/build-support": "^0"
+    "@dashbling/build-support": "beta"
   },
   "dependencies": {
     "react": "^16.2",
     "react-dom": "^16.2",
-    "@dashbling/core": "^0",
+    "@dashbling/core": "beta",
     "@dashbling/client": "^0",
     "dashbling-widget-weather": "^2.0.0"
   }

Hi @pascalw it works!

Great! I'll publish a new version this weekend, along with a bunch of dependency updates.

Hi @kivancsahici I've just published a new version (0.4.1) with fixes for Windows compatibility and a lot of dependency upgrades.

If you have an existing project you can upgrade as follows:

yarn upgrade --scope @dashbling --latest