Home UI Development setup: Command "cross-env" not found

Hi all,

I’m trying to get a development environment running for the Home UI. I did install the latest NodeJS LTS version and check out the master branch. Now I run npm start on the “web” directory, but it fails with error message Der Befehl "cross-env" ist entweder falsch geschrieben oder konnte nicht gefunden werden. (Command “cross-env” not found).

I’m running on Windows 10. npm version output:

{
  openhab: '3.0.0',
  npm: '6.14.9',
  ares: '1.16.1',
  brotli: '1.0.9',
  cldr: '37.0',
  icu: '67.1',
  llhttp: '2.1.3',
  modules: '83',
  napi: '7',
  nghttp2: '1.41.0',
  node: '14.15.3',
  openssl: '1.1.1g',
  tz: '2020a',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '8.4.371.19-node.17',
  zlib: '1.2.11'
}

Full output of npm start:

E:\openhab-webui\bundles\org.openhab.ui\web>npm start

> openhab@3.0.0 start E:\openhab-webui\bundles\org.openhab.ui\web
> npm run dev


> openhab@3.0.0 dev E:\openhab-webui\bundles\org.openhab.ui\web
> cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js

Der Befehl "cross-env" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openhab@3.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openhab@3.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\petty\AppData\Roaming\npm-cache\_logs\2020-12-23T05_34_37_478Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openhab@3.0.0 start: `npm run dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the openhab@3.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\petty\AppData\Roaming\npm-cache\_logs\2020-12-23T05_34_37_509Z-debug.log

Any idea what could be wrong here?

Do the hints given at laravel - `npm run dev` results in Windows error `'cross-env' is not recognized as an internal or external command` - Stack Overflow help ?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.