Problem description
After updating to 3.1.0 (Alloy 1.1.0), I found out that my Alloy installed version was not reflecting the displayed version number and was not the 1.1.0 correct one, but a previous one.
'alloy -v' command was displaying the correct version (1.1.0) but the code in '/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js' @lines 330 to 343 was wrong, not reflecting changes made for 1.1.0.
Cleaning npm cache (sudo npm cache clean) fixed the issue and I was able to install the correct Alloy 1.1.0 version using 'sudo npm install -g alloy' command.
Note
The code from in '/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js' @lines 330 to 343 should be:
// Load the style and update the state
if (files.STYLE) {
var theStyles = _.isArray(files.STYLE) ? files.STYLE : [{file:files.STYLE}];
_.each(theStyles, function(style) {
if (fs.existsSync(style.file)) {
logger.info(' style: "' +
path.relative(path.join(dir,CONST.DIR.STYLE),style.file) + '"');
state.styles = CU.loadAndSortStyle(style.file, manifest, {
existingStyle: state.styles,
platform: style.platform
});
}
});
}
We are seeing this on Olga's machine. Not currently seeing this on mine. Her steps: 1) "sudo uninstall -g alloy" 2) Studio launch, prompt for install of alloy 3) Install alloy 4) "alloy -v" gets you 1.1.0 Code snippet shown above not present on her machine. It is accurate on mine.
Deferring for now as there appears to be a workaround. Likely this is a Node.js/NPM bug.
I tested this with NPM 3 and the globally installed Alloy and everything worked as expected. This sounds like a bug in NPM. Neither here nor there, this is pretty a non-issue with the Appc CLI and will certainly be a non-issue after we roll out the new build pipeline.
Closing ticket as the issue cannot be reproduced and with reference to the previous comments.