Closed leftyfl1p closed 3 years ago
Try 'next' Branch. It has many fixes.
FYI, I recently updated to the latest 'next' code - and now npm run build
is failing. Not sure if it's just me (likely ... LOL). I did install and update npm, still having issues. If it helps, log attached.
2020-12-26T17_56_03_453Z-debug.log
Thanks!
Did you run 'npm i' to make sure you have the latest dependencies?
Yes - sorry, didn't say that very clearly above. Did npm i
, and also checked outdated, did an update. I can try whacking the entire node-modules directory, reinstall. No biggie, if it makes sense to try it.
Thanks!
@leftyfl1p I was able to replicate your issue; need to investigate.
@arrmo I still can't replicate your issue. Try upgrading to node v12.
Try upgrading to node v12
Error earlier 🤣. Upgraded, but now the poolController won't start? Error as below,
web/interfaces/influxInterface.ts:19:42 - error TS2305: Module '"../../node_modules/@influxdata/influxdb-client/dist/all"' has no exported member 'WritePrecision'.
Do you have influxdata enabled?
And FYI, inside webClient,
pi@rpi3b:~/Documents/nodejs-poolController-webClient(next)$ npm install
npm WARN react-horizontal-stacked-bar-chart@8.15.2 requires a peer of react@~16.12.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-rangeslider@2.2.0 requires a peer of react@^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN recompose@0.22.0 requires a peer of react@^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN nodejs-poolcontroller-webclient@6.1.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
poolController won't start
OK, fixed this one 😄. From the latest at https://github.com/influxdata/influxdb-client-js/blob/master/examples/write.js, changes as below ... do you want to add this in, or a PR for this?
$ git diff web/interfaces/influxInterface.ts
diff --git a/web/interfaces/influxInterface.ts b/web/interfaces/influxInterface.ts
index 32eef8a..81f43cb 100644
--- a/web/interfaces/influxInterface.ts
+++ b/web/interfaces/influxInterface.ts
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import extend = require("extend");
-import { ClientOptions, InfluxDB, Point, WritePrecision } from '@influxdata/influxdb-client';
+import { ClientOptions, InfluxDB, Point } from '@influxdata/influxdb-client';
import { utils } from '../../controller/Constants';
import { logger } from "../../logger/Logger";
import { BaseInterfaceBindings, InterfaceContext, InterfaceEvent } from "./baseInterface";
@@ -49,7 +49,7 @@ export class InfluxInterfaceBindings extends BaseInterfaceBindings {
token: `${baseOpts.username}:${baseOpts.password}`,
}
const influxDB = new InfluxDB(clientOptions);
- this.writeApi = influxDB.getWriteApi('', bucket, 'ms' as WritePrecision);
+ this.writeApi = influxDB.getWriteApi('', bucket, 'ms');
// set global tags from context
let baseTags = {}
And FYI, inside webClient,
And this one ... fixed also 😄. Removed node, nodejs, node_modules => clean upgrade to v14, install all npm again. FYI, still this list of warnings,
npm WARN nodejs-poolcontroller-webclient@6.1.1 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
Thanks!
OK, not so fast ... LOL. webClient still fails to build / run (parcel it seems?).
What platform are you running this on? And try Node v12. v14 hasn't been tested yet and could have some breaking changes.
I just downloaded -webClient onto my Pi, switched to the next branch, ran npm i and npm start and it worked fine. Did you run npm upgrade
by any chance? And don't worry about any errors/warnings that say optional. They aren't needed.
And mqtt is only on njsPC, not webclient. Let's try to keep the issues separate because they aren't related at all.
Well, I had issues with v12, that's why I tried v14 (also) ... LOL. I did run npm upgrade - is that known to cause issues? I can whack all of node_modules, try again. NP!
Yes, agreed (separate issues) - do you want me to open a different issue report? I can, NP there.
Thanks!
npm upgrade - is that known to cause issues?
That's it! Clean wipe + npm install ... it works again. Thanks!
Hmmm ... why does npm upgrade not work? Thinking it should, no?
Ya, 'npm upgrade' will try to load newer versions of packages. So, say we code with Influx 1.8 then the upgrade may try to install Influx 2 modules. There should be safe guards around it (eg only upgrade minor/patch version) but sometimes it will cause incompatibility.
Ya, 'npm upgrade' will try to load newer versions of packages
OK, wondered if that was what it was. So you specify target versions (installed with npm install
), right? Thanks!
Live and learn 🤣.
FYI, wasn't trying to sidetrack this, rather test it here. I can confirm, from Utilities (menu), I also see
Cannot GET /utilities
With the latest code.
I have deprecated this project in favor of dashPanel. Rstrouse and I have been doing a ton of work and this project has fallen behind and it isn't worth the effort to keep two similar projects maintained. If anything from this project is missing please request it in the other repo.
The "Utilities" nav button at the top sends me to
/utilities
and 404s with the errorCannot GET /utilities
. Default config file, haven't changed anything. Let me know if you need more info.Version:
6.1.0
Config file: