!Info: Latest release of gulp-ng-constant breaks Volumio2-UI

cd Volumio2-UI
npm install
gulp serve --theme="volumio"

The above currently breaks the Volumio2-UI installation. The build completes without reporting any problems, but the browser that is opened displays only a gray screen.

A quick way to check if you’re affected by this problem is to look up ./src/app/ngConstants.js. If it exists, you’ve got a different/additional problem. If it’s missing, and instead you find the file ‘./src/app/volumio.constants.js’, then you’ve got a version of gulp-ng-constants which is incompatible with Volumio2-UI.

To quickly get back to a running state, Modify package.json as follows;

Replace this: “gulp-ng-constant”: “^1.1.0”,
With this: “gulp-ng-constant”: “1.1.0”,

and then:

npm install
gulp serve --theme="volumio"

While this doesn’t really fix the problem, it at least avoids it until someone can analyze the breaking changes in the gulp-ng-constants package and really fix the issue.

Could you possibly explain a bit more? I have an ngConstants.js file, I got back the right version of gulp-ng-constant (1.1.0), it hasn’t fixed the problem.

Never mind, I worked it out, I think. So the old version of of the module wasn’t respecting the .name parameter, so was still writing to the ngConstants.js file. Renaming ngConstants.js to volumio.constant.js is a temporary fix, but it’s not going to pick up any changes you make in gulp/scripts.js.

Actual fix is to bump the required version to ^1.2.0.

As stated in the first post, if you have the ngConstants.js file, then the problem described here isn’t the same as the problem you have (or had), even if the symptom (gray screen) is identical.

That ^1.2.0 fixes anything seems strange to me, because both ^1.2.0 and ^1.1.0 should install the same version of gulp-ng-constant (currently 1.2.0).

Pull the master repo and everything will be fine

Thanks Michaelangelo, looks like you fixed things the way they ought to be fixed [emoji3]

I downgraded node to 6.11.0, but getting this on npm install

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ] 2 info using npm@3.10.10 3 info using node@v6.11.0 4 verbose stack Error: Cannot find module 'realize-package-specifier' 4 verbose stack at Function.Module._resolveFilename (module.js:469:15) 4 verbose stack at Function.Module._load (module.js:417:25) 4 verbose stack at Module.require (module.js:497:17) 4 verbose stack at require (internal/module.js:20:19) 4 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/install/deps.js:11:31) 4 verbose stack at Module._compile (module.js:570:32) 4 verbose stack at Object.Module._extensions..js (module.js:579:10) 4 verbose stack at Module.load (module.js:487:32) 4 verbose stack at tryModuleLoad (module.js:446:12) 4 verbose stack at Function.Module._load (module.js:438:3) 5 verbose cwd /Users/bshanley/src/pers/Volumio2-UI 6 error Darwin 16.7.0 7 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" 8 error node v6.11.0 9 error npm v3.10.10 10 error code MODULE_NOT_FOUND 11 error Cannot find module 'realize-package-specifier' 12 error If you need help, you may report this error at: 12 error <https://github.com/npm/npm/issues> 13 verbose exit [ 1, true ]