ioBroker / dev-server

MIT License
14 stars 8 forks source link

adapter fails to run when running dev-server watch for newly created adapter #79

Closed Garfonso closed 3 years ago

Garfonso commented 3 years ago

I did just create an adapter (TS + react) with adapter creator. I did specify to use dev-server in the process. So dev-server was already setup by adapter creator. Now, after a problem with dependencies, the build works and I did want to start the adapter with dev-server watch to have a look at the config and so on, but the adapter does not start. It fails with "invalid configuration".

I had a look at the objects database and there is no instance configured for the adapter at all. This is probably why it fails. I had to manually add the instance and disable it and now it seems to be working.

It would be nice if we can make this progress a bit smoother, especially for new adapers / devs.

D:\iobroker\ioBroker.ico>dev-server watch
Using profile default
Using profile name "default"
Using adapter name "ico"
Install local iobroker.ico
D:\iobroker\ioBroker.ico> npm run build

> iobroker.ico@0.0.1 prebuild D:\iobroker\ioBroker.ico
> rimraf ./build

> iobroker.ico@0.0.1 build D:\iobroker\ioBroker.ico
> npm run build:ts && npm run build:parcel

> iobroker.ico@0.0.1 build:ts D:\iobroker\ioBroker.ico
> tsc -p tsconfig.build.json

> iobroker.ico@0.0.1 build:parcel D:\iobroker\ioBroker.ico
> parcel build admin/src/index.tsx -d admin/build

√  Built in 872ms.

admin\build\index.js.map     ‼  2.18 MB    137ms
admin\build\index.js          825.85 KB    613ms
admin\build\index.css.map       7.32 KB      3ms
admin\build\index.css           3.39 KB    124ms
D:\iobroker\ioBroker.ico> npm pack
Packed to iobroker.ico-0.0.1.tgz
D:\iobroker\ioBroker.ico\.dev-server\default> npm install "D:\iobroker\ioBroker.ico\iobroker.ico-0.0.1.tgz"

> diskusage@1.1.3 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage
> node-gyp rebuild

D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage>if not defined npm_config_node_gyp (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-
gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\achim\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

> unix-dgram@2.0.3 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram
> node-gyp rebuild

D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram>if not defined npm_config_node_gyp (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node
-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\achim\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: diskusage@1.1.3 (node_modules\diskusage):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: diskusage@1.1.3 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: unix-dgram@2.0.3 (node_modules\unix-dgram):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: unix-dgram@2.0.3 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ iobroker.ico@0.0.1
added 1 package from 1 contributor and audited 376 packages in 3.512s

11 packages are looking for funding
  run `npm fund` for details

found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
D:\iobroker\ioBroker.ico\.dev-server\default> node node_modules/iobroker.js-controller/controller.js
Running inside D:\iobroker\ioBroker.ico\.dev-server\default
Starting React build
Waiting for first successful React build...
D:\iobroker\ioBroker.ico> npm run watch:parcel
2021-07-10 08:55:49.625  - info: host.dev-ico-KM iobroker.js-controller version 3.3.14 js-controller starting
2021-07-10 08:55:49.626  - info: host.dev-ico-KM Copyright (c) 2014-2021 bluefox, 2014 hobbyquaker
2021-07-10 08:55:49.627  - info: host.dev-ico-KM hostname: dev-ico-KM, node: v14.16.0
2021-07-10 08:55:49.627  - info: host.dev-ico-KM ip addresses: fe80::2430:7f32:8da:b40f 192.168.0.3
2021-07-10 08:55:49.632  - debug: host.dev-ico-KM-Server Data File: D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\objects.json
2021-07-10 08:55:49.638  - debug: host.dev-ico-KM-Server  Redis inMem-objects listening on port 9001
2021-07-10 08:55:49.639  - debug: host.dev-ico-KM Redis Objects: Use Redis connection: 127.0.0.1:26430
2021-07-10 08:55:49.645  - debug: host.dev-ico-KM Objects client ready ... initialize now
2021-07-10 08:55:49.646  - debug: host.dev-ico-KM Objects create System PubSub Client
2021-07-10 08:55:49.646  - debug: host.dev-ico-KM Objects client initialize lua scripts
2021-07-10 08:55:49.652  - debug: host.dev-ico-KM Objects connected to redis: 127.0.0.1:26430
2021-07-10 08:55:49.654  - debug: host.dev-ico-KM-Server Data File: D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\states.json
2021-07-10 08:55:49.656  - debug: host.dev-ico-KM-Server  Redis inMem-states listening on port 9000
2021-07-10 08:55:49.656  - debug: host.dev-ico-KM Redis States: Use Redis connection: 127.0.0.1:24430
2021-07-10 08:55:49.658  - debug: host.dev-ico-KM States create System PubSub Client
2021-07-10 08:55:49.660  - debug: host.dev-ico-KM States connected to redis: 127.0.0.1:24430
2021-07-10 08:55:49.668  - info: host.dev-ico-KM connected to Objects and States
2021-07-10 08:55:49.669  - debug: host.dev-ico-KM Could not read notifications.json: D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\notifications.json: ENOENT: no such file or directory, open 'D:\iobroker\ioBroker.i
co\.dev-server\default\iobroker-data\notifications.json'
2021-07-10 08:55:49.679  - info: host.dev-ico-KM added notifications configuration of host
2021-07-10 08:55:49.684  - debug: host.dev-ico-KM Plugin sentry Initialize Plugin (enabled=true)

> iobroker.ico@0.0.1 watch:parcel D:\iobroker\ioBroker.ico
> parcel admin/src/index.tsx -d admin/build
2021-07-10 08:55:49.813  - info: host.dev-ico-KM 1 instance found
2021-07-10 08:55:49.813  - debug: host.dev-ico-KM check instance "system.adapter.admin.0" for host "dev-ico-KM"
host.dev-ico-KM check instance "system.adapter.admin.0" for host "dev-ico-KM"
2021-07-10 08:55:49.815  - info: host.dev-ico-KM starting 1 instance
2021-07-10 08:55:49.823  - debug: host.dev-ico-KM added notifications configuration of system.adapter.admin.0
2021-07-10 08:55:49.824  - debug: host.dev-ico-KM startInstance admin.0 loglevel=info, compact=false
2021-07-10 08:55:49.828  - info: host.dev-ico-KM instance system.adapter.admin.0 started with pid 29460
Server running at http://localhost:1234
√  Built in 6.38s.
Starting browser-sync
[HPM] Proxy created: /adapter/ico/**,/browser-sync/**  -> http://localhost:22430
[HPM] Proxy rewrite rule created: "^/adapter/ico/" ~> "/"
[HPM] Proxy created: !/adapter/ico/**,!/browser-sync/**  -> http://localhost:20430
Starting web server on port 8085
╭─────────────────────────────────────────────────────────╮
│                                                         │
│   Admin is now reachable under http://localhost:8085/   │
│                                                         │
╰─────────────────────────────────────────────────────────╯
Starting tsc --watch
Waiting for first successful tsc build...
D:\iobroker\ioBroker.ico> npm run watch:ts
WebSocket open

> iobroker.ico@0.0.1 watch:ts D:\iobroker\ioBroker.ico
> tsc -p tsconfig.build.json --watch
08:55:57 - Starting compilation in watch mode...
[HPM] Upgrading to WebSocket
================================== > LOG REDIRECT system.adapter.admin.0 => true [system.adapter.admin.0.logging]
2021-07-10 08:55:57.610  - debug: host.dev-ico-KM Incoming Host message getRepository
2021-07-10 08:55:57.612  - info: host.dev-ico-KM Updating repository "stable" under "http://download.iobroker.net/sources-dist.json"
hash changed or no sources cached => force download of new sources
2021-07-10 08:55:58.724  - debug: host.dev-ico-KM Incoming Host message getInstalled
2021-07-10 08:55:59.131  - debug: host.dev-ico-KM Incoming Host message getNotifications

08:55:59 - Found 0 errors. Watching for file changes.
Starting file system sync from D:\iobroker\ioBroker.ico
2021-07-10 08:55:59.234  - debug: host.dev-ico-KM Incoming Host message getHostInfo
Synchronizing build\main.js
Synchronizing build\main.js.map
Patched D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.ico\build\main.js.map from D:\iobroker\ioBroker.ico\build\main.js.map
Synchronizing build\lib\tools.js
Synchronizing build\lib\tools.js.map
Starting nodemon for D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.ico\build\main.js
Patched D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.ico\build\lib\tools.js.map from D:\iobroker\ioBroker.ico\build\lib\tools.js.map
[nodemon] 2.0.11
[nodemon] to restart at any time, enter `rs`
[nodemon] ignoring: .\.dev-server\default\node_modules\iobroker.ico\admin/**/*
[nodemon] watching path(s): .dev-server\default\node_modules\iobroker.ico\**\*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node --inspect D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.ico\build\main.js --debug 0`
[nodemon] spawning
[nodemon] child pid: 34956
[nodemon] watching 8 files
Debugger listening on ws://127.0.0.1:9229/b8506643-65a4-4910-801e-6500fd6d5f83
For help, see: https://nodejs.org/en/docs/inspector
╭───────────────────────────────────────────────────╮
│                                                   │
│   Debugger is now available on process id 35520   │
│                                                   │
╰───────────────────────────────────────────────────╯
2021-07-10 08:55:59.734  - debug: ico.0 (35520) Redis Objects: Use Redis connection: 127.0.0.1:26430
2021-07-10 08:55:59.744  - debug: ico.0 (35520) Objects client ready ... initialize now
2021-07-10 08:55:59.747  - debug: ico.0 (35520) Objects create System PubSub Client
2021-07-10 08:55:59.748  - debug: ico.0 (35520) Objects create User PubSub Client
2021-07-10 08:55:59.750  - debug: ico.0 (35520) Objects client initialize lua scripts
2021-07-10 08:55:59.758  - debug: ico.0 (35520) Objects connected to redis: 127.0.0.1:26430
2021-07-10 08:55:59.765  - debug: ico.0 (35520) objectDB connected
2021-07-10 08:55:59.767  - debug: ico.0 (35520) Redis States: Use Redis connection: 127.0.0.1:24430
2021-07-10 08:55:59.771  - debug: ico.0 (35520) States create System PubSub Client
2021-07-10 08:55:59.771  - debug: ico.0 (35520) States create User PubSub Client
2021-07-10 08:55:59.775  - debug: ico.0 (35520) States connected to redis: 127.0.0.1:24430
2021-07-10 08:55:59.776  - debug: ico.0 (35520) statesDB connected
2021-07-10 08:55:59.779  - error: ico.0 (35520) ico.0 invalid config
2021-07-10 08:55:59.779  - warn: ico.0 (35520) Terminated (INVALID_ADAPTER_CONFIG): Without reason
2021-07-10 08:56:00.015  - debug: host.dev-ico-KM Incoming Host message getLogs
[nodemon] app crashed - waiting for file changes before starting...
UncleSamSwiss commented 3 years ago

Can you please provide the output of the initial dev-server setup? I think there was a problem during setup and thus it didn't add the adapter instance properly. This is only done exactly once.

Garfonso commented 3 years ago

Here is log output from create-adapter work after creation.

I did not really check this before and it seems that for now this is connected to the adapter not being build properly, i.e. fixed here https://github.com/ioBroker/create-adapter/issues/781

[1/5] Generating files...
[2/5] Installing dependencies...
npm WARN deprecated parcel-bundler@1.12.5: Parcel v1 is no longer maintained. Please migrate to v2, which is published under the 'parcel' package. See https://v2.parceljs.org/getting-started/migration for details.
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated querystring@0.2.0: The
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

> deasync@0.1.21 install D:\iobroker\ioBroker.ico\node_modules\deasync
> node ./build.js

`win32-x64-node-14` exists; testing
Binary is fine; exiting

> core-js@2.6.12 postinstall D:\iobroker\ioBroker.ico\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

> parcel-bundler@1.12.5 postinstall D:\iobroker\ioBroker.ico\node_modules\parcel-bundler
> node -e "console.log('\u001b[35m\u001b[1mLove Parcel? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/parcel/donate\u001b[0m')"

Love Parcel? You can now donate to our open collective:
 > https://opencollective.com/parcel/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\glob-watcher\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\@parcel\watcher\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1319 packages from 1123 contributors and audited 1331 packages in 25.047s

103 packages are looking for funding
  run `npm fund` for details

found 9 vulnerabilities (1 low, 5 moderate, 3 high)
  run `npm audit fix` to fix them, or `npm audit` for details
[3/5] Compiling source files...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iobroker.ico@0.0.1 build:parcel: `parcel build admin/src/index.tsx -d admin/build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iobroker.ico@0.0.1 build:parcel script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\achim\AppData\Roaming\npm-cache\_logs\2021-07-10T06_39_47_621Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iobroker.ico@0.0.1 build: `npm run build:ts && npm run build:parcel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iobroker.ico@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\achim\AppData\Roaming\npm-cache\_logs\2021-07-10T06_39_47_644Z-debug.log
[4/5] Installing dev-server...
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated xmldom@0.1.16: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
C:\Users\achim\AppData\Roaming\npm\dev-server -> C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js
C:\Users\achim\AppData\Roaming\npm\iobroker-dev-server -> C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js

> nodemon@2.0.11 postinstall C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\@iobroker\dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ @iobroker/dev-server@0.4.0
updated 7 packages in 13.458s
Using default profile default
Using profile name "default"
Using adapter name "ico"
Setting up in D:\iobroker\ioBroker.ico\.dev-server\default
Verifying .npmignore and .gitignore
D:\iobroker\ioBroker.ico> npm pack --dry-run
D:\iobroker\ioBroker.ico> git status --short --untracked-files=all
Couldn't check .gitignore: Error: Command failed: git status --short --untracked-files=all
fatal: not a git repository (or any of the parent directories): .git

Installing js-controller and admin...
D:\iobroker\ioBroker.ico\.dev-server\default> npm install --loglevel error --production

> iobroker.js-controller@3.3.14 preinstall D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.js-controller
> node lib/preinstallCheck.js

NPM version: 6.14.8

> diskusage@1.1.3 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage
> node-gyp rebuild

D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage>if not defined npm_config_node_gyp (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\achim\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\diskusage
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

> unix-dgram@2.0.3 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram
> node-gyp rebuild

D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram>if not defined npm_config_node_gyp (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Users\achim\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\achim\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\unix-dgram
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

> ursa-optional@0.9.10 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\ursa-optional
> node rebuild.js

ursaNative bindings compilation fail. This is not an issue. Modules that depend on it will use fallbacks.

> iobroker.js-controller@3.3.14 install D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\iobroker.js-controller
> node iobroker.js setup first

Server Cannot load D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\objects.json: Database file D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\objects.json does not exists.. We try last Backup!
Server Cannot load D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\states.json: Database file D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\states.json does not exists.. We try last Backup!
Server Cannot load D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\objects.json.bak: Database file D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\objects.json.bak does not exists.. Continue with empty dataset!
Server If this is no Migration or initial start please restore the last backup from D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\backup-objects
Server Cannot load D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\states.json.bak: Database file D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\states.json.bak does not exists.. Continue with empty dataset!
Server If this is no Migration or initial start please restore the last backup from D:\iobroker\ioBroker.ico\.dev-server\default\iobroker-data\backup-objects
 Cannot read system.config: null (OK when migrating or restoring)
object 0_userdata.0.example_state created
object 0_userdata.0 created
object alias.0 created
object system.certificates created
object system.repositories created
object system.config created
object enum.functions created
object enum.rooms created
object system.group.user created
object system.group.administrator created
object _design/custom created
object _design/system created
object system.meta.uuid created: 028e5730-dd03-bfd3-661f-67eae064f8eb
object system.user.admin created

ATTENTION: Error reporting via Sentry will be activated on next start of ioBroker

ioBroker wants to make sure to deliver the most stable smart home system.
To allow this we decided to implement an automatic error and crash reporting solution into the js-controller and also into adapters.

THIS REPORTING WILL BE ENABLED WITH THE NEXT START OF YOUR IOBROKER!

For any error that leads to the crash of the js-controller or one of the relevant adapters the error details are send to a server. For the js-controller and core adapters this server is located and operated in germany. For community adapters please check the Github Readme of the affected adapter for details which Sentry server is used.

If you want to disable the error reporting you can use the command
'iobroker plugin disable sentry'
This command will also make sure that no adapter that runs on this host will send crash reporting data to sentry.

Renamed repository "default to "stable"
Renamed repository "latest to "beta"

> @root/acme@3.1.0 postinstall D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\@root\acme
> node scripts/postinstall

> esbuild@0.11.23 postinstall D:\iobroker\ioBroker.ico\.dev-server\default\node_modules\esbuild
> node install.js

added 372 packages from 355 contributors and audited 376 packages in 18.201s

11 packages are looking for funding
  run `npm fund` for details

found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Upload iobroker.admin
D:\iobroker\ioBroker.ico\.dev-server\default> node node_modules/iobroker.js-controller/iobroker.js upload admin
upload [14] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/words.js words.js application/javascript
upload [13] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/jsonConfig.json jsonConfig.json application/json
upload [12] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/index_m.html index_m.html text/html
upload [11] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/index.html index.html text/html
upload [10] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/zh-cn/translations.json i18n/zh-cn/translations.json application/json
upload [9] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/ru/translations.json i18n/ru/translations.json application/json
upload [8] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/pt/translations.json i18n/pt/translations.json application/json
upload [7] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/pl/translations.json i18n/pl/translations.json application/json
upload [6] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/nl/translations.json i18n/nl/translations.json application/json
upload [5] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/it/translations.json i18n/it/translations.json application/json
upload [4] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/fr/translations.json i18n/fr/translations.json application/json
upload [3] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/es/translations.json i18n/es/translations.json application/json
upload [2] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/en/translations.json i18n/en/translations.json application/json
upload [1] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/i18n/de/translations.json i18n/de/translations.json application/json
upload [0] admin.admin D:/iobroker/ioBroker.ico/.dev-server/default/node_modules/iobroker.admin/admin/admin.png admin.png image/png
D:\iobroker\ioBroker.ico\.dev-server\default> node node_modules/iobroker.js-controller/iobroker.js list instances
Add admin.0
D:\iobroker\ioBroker.ico\.dev-server\default> node node_modules/iobroker.js-controller/iobroker.js add admin 0
host.dev-ico-KM create instance admin
host.dev-ico-KM object admin.0.info.updatesList created
host.dev-ico-KM object admin.0.info.newsLastId created
host.dev-ico-KM object admin.0.info.newsETag created
host.dev-ico-KM object admin.0.info.newsFeed created
host.dev-ico-KM object admin.0.info.connection created
host.dev-ico-KM object admin.0 created
host.dev-ico-KM object admin.0.info created
host.dev-ico-KM object system.adapter.admin.upload created
host.dev-ico-KM object system.adapter.admin.0.logLevel created
host.dev-ico-KM object system.adapter.admin.0.sigKill created
host.dev-ico-KM object system.adapter.admin.0.eventLoopLag created
host.dev-ico-KM object system.adapter.admin.0.outputCount created
host.dev-ico-KM object system.adapter.admin.0.inputCount created
host.dev-ico-KM object system.adapter.admin.0.uptime created
host.dev-ico-KM object system.adapter.admin.0.memRss created
host.dev-ico-KM object system.adapter.admin.0.memHeapTotal created
host.dev-ico-KM object system.adapter.admin.0.memHeapUsed created
host.dev-ico-KM object system.adapter.admin.0.cputime created
host.dev-ico-KM object system.adapter.admin.0.cpu created
host.dev-ico-KM object system.adapter.admin.0.compactMode created
host.dev-ico-KM object system.adapter.admin.0.connected created
host.dev-ico-KM object system.adapter.admin.0.alive created
host.dev-ico-KM Set default value of admin.0.info.updatesList:
host.dev-ico-KM Set default value of admin.0.info.connection:
host.dev-ico-KM object system.adapter.admin.0 created
Configure admin.0
D:\iobroker\ioBroker.ico\.dev-server\default> node node_modules/iobroker.js-controller/iobroker.js set admin.0 --port 20430 --bind 127.0.0.1
New port for "admin.0" is: 20430
New bind for "admin.0" is: 127.0.0.1
Instance settings for "admin.0" are changed.
Install local iobroker.ico
D:\iobroker\ioBroker.ico> npm run build

> iobroker.ico@0.0.1 prebuild D:\iobroker\ioBroker.ico
> rimraf ./build

> iobroker.ico@0.0.1 build D:\iobroker\ioBroker.ico
> npm run build:ts && npm run build:parcel

> iobroker.ico@0.0.1 build:ts D:\iobroker\ioBroker.ico
> tsc -p tsconfig.build.json

> iobroker.ico@0.0.1 build:parcel D:\iobroker\ioBroker.ico
> parcel build admin/src/index.tsx -d admin/build

×  D:\iobroker\ioBroker.ico\node_modules\@iobroker\adapter-react\GenericApp.js:22:44: Cannot resolve dependency '@material-ui/icons/Close'
  20 | var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
  21 |
> 22 | var _Close = _interopRequireDefault(require("@material-ui/icons/Close"));
     |                                            ^
  23 |
  24 | var _Prompt = _interopRequireDefault(require("./Prompt"));
  25 |
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iobroker.ico@0.0.1 build:parcel: `parcel build admin/src/index.tsx -d admin/build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iobroker.ico@0.0.1 build:parcel script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\achim\AppData\Roaming\npm-cache\_logs\2021-07-10T06_40_54_055Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iobroker.ico@0.0.1 build: `npm run build:ts && npm run build:parcel`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iobroker.ico@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\achim\AppData\Roaming\npm-cache\_logs\2021-07-10T06_40_54_084Z-debug.log
index.js setup [profile]

Set up dev-server in the current directory. This should always be called in the directory where the
io-package.json file of your adapter is located.

Options:
      --version       Show version number                                                  [boolean]
  -t, --temp          Temporary directory where the dev-server data will be located
                                                                   [string] [default: ".dev-server"]
      --help          Show help                                                            [boolean]
  -p, --adminPort     TCP port on which ioBroker.admin will be available    [number] [default: 8081]
  -j, --jsController  Define which version of js-controller to be used  [string] [default: "latest"]
  -a, --admin         Define which version of admin to be used          [string] [default: "latest"]
  -b, --backupFile    Provide an ioBroker backup file to restore in this dev-server         [string]

Error: Command failed: npm run build
    at checkExecSyncError (child_process.js:616:11)
    at Object.execSync (child_process.js:652:15)
    at DevServer.execSync (C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js:1106:19)
    at DevServer.installLocalAdapter (C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js:1060:18)
    at async DevServer.setupDevServer (C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js:937:13)
    at async DevServer.setup (C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js:251:9)
    at async Object.handler (C:\Users\achim\AppData\Roaming\npm\node_modules\@iobroker\dev-server\dist\index.js:93:28) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 32696,
  stdout: null,
  stderr: null
}
[5/5] Initializing git repo...

All done! Have fun programming! ♥