Ember deploy script failing on specific npm package - ember.js

I'm trying to deploy to my staging environment using ember deploy and continue to get this error which breaks the build
An error occurred in the constructor for ember-cli-htmlbars-inline-precompile
I tracked down the issue via guess and checking to a specific handlebars template, that once commented out stopped the problem and allowed me to finish the script. Unfortunatley I'm getting this same issue again. This error does not occur when I build or run the app locally.
Is my package.json
I'm using node 6.15.1
I've tried v0.3.0, v0.4.0, v1.0.0, and v2.0.0 of
ember-cli-htmlbars-inline-precompile to no avail.
I'm assuming my problem again is in some handlebars template, but unfortunately without the errors locally I can't deduce the location.
"name": "~~~",
"description": "Small description for ~~~~ goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test",
"lint": "eslint .",
"postinstall": "./node_modules/bower/bin/bower install --allow-root"
},
"repository": "",
"engines": {
"node": "6.15.1"
},
"author": "",
"license": "MIT",
"devDependencies": {},
"dependencies": {
"#babel/core": "^7.4.4",
"#newrelic/publish-sourcemap": "4.4.0",
"active-model-adapter": "^2.2.0",
"babel-eslint": "^7.0.0",
"bower": "^1.8.2",
"broccoli-asset-rev": "2.2.0",
"broccoli-stew": "^2.1.0",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.15.1",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.7.1",
"ember-cli-bootstrap-sass": "git+https://github.com/~~~/ember-cli-bootstrap-sass.git",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-deploy": "^1.0.2",
"ember-cli-deploy-build": "^1.1.1",
"ember-cli-deploy-change-log": "git+https://github.com/~~~~/ember-cli-deploy-change-log.git",
"ember-cli-deploy-display-revisions": "^1.0.1",
"ember-cli-deploy-gzip": "^1.0.1",
"ember-cli-deploy-revision-data": "git+https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data.git",
"ember-cli-deploy-s3": "git+https://github.com/~~~/ember-cli-deploy-s3.git",
"ember-cli-deploy-s3-index": "git+https://github.com/~~~/ember-cli-deploy-s3-index.git",
"ember-cli-deploy-slack": "^1.0.1",
"ember-cli-eslint": "^4.0.0",
"ember-cli-flash": "^1.7.1",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.0.0",
"ember-cli-inject-live-reload": "^1.10.2",
"ember-cli-inline-content": "^0.4.0",
"ember-cli-loading-slider": "^2.0.0",
"ember-cli-moment-shim": "^3.7.1",
"ember-cli-phone-number": "^0.1.4",
"ember-cli-pretender": "0.5.0",
"ember-cli-qunit": "^4.0.0",
"ember-cli-release": "0.2.9",
"ember-cli-sass": "^10.0.0",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^2.2.0",
"ember-cli-uglify": "^1.2.0",
"ember-cli-velocity": "^0.4.0",
"ember-cli-version-checker": "^2.1.2",
"ember-click-outside": "0.1.12",
"ember-composable-helpers": "2.1.0",
"ember-data": "~2.16.3",
"ember-decorators": "^2.5.2",
"ember-export-application-global": "^2.0.0",
"ember-faker": "1.1.0",
"ember-inflector": "^2.3.0",
"ember-link-action": "^0.1.3",
"ember-load-initializers": "^1.0.0",
"ember-moment": "^7.8.1",
"ember-new-relic": "0.6.1",
"ember-resolver": "^4.0.0",
"ember-simple-auth": "^1.8.2",
"ember-source": "^2.15.3",
"ember-welcome-page": "^3.0.0",
"eslint": "~2.2.0",
"eslint-config-google": "^0.4.0",
"eslint-config-xo": "^0.10.1",
"eslint-plugin-babel": "^3.1.0",
"express": "^4.16.4",
"font-awesome": "^4.7.0",
"glob": "^7.1.4",
"jquery": "~2.2.4",
"loader.js": "^4.7.0",
"phantomjs-prebuilt": "^2.1.16",
"rsvp": "^4.8.4",
"sass": "^1.20.1",
"velocity-animate": "^1.5.2"
}
}```

By using urls from GitHub to pull in npm packages, you are grabbing the latest code from GitHub for those packages. That code isn't necessarily ready to be used with your other dependencies, and may have breaking API changes compared to what is in the READMEs.
If you use a specific version of these packages from npm, I think your problem will likely go away. If you are working off an internal fork, consider basing your work off the last stable release, rather than master of those packages.
It is possible that the deploys aren't the real problem. If you do ember serve --production, does the app run? The production flag will make sure that your app goes through all the same compilation and minification that deploy would. If running with prod doesn't work, it means that there's an issues elsewhere in your app besides those GitHub urls.
I also suggest creating a fresh 2.15 app with these dependencies to see what happens.

Related

ember-bootstrap with LESS -- application css not transpiling

I'm working on upgrading little-by-little an EmberJS Application that uses ember-bootstrap. Before moving to Ember 4 we are trying to move up to the Ember 3 LTS 3.28.6. However, we have ember-bootstrap using LESS in our project and things have fallen apart a bit because of some dependency mapping that pushes us to newer versions. To avoid migrating to SASS, I'm currently trying to use https://github.com/seanCodes/bootstrap-less-port to keep less for one last iteration. But a curious thing is happening in my local build: the application css is not being generated (.css) is nowhere to be found in dist/assets/ !
The build seems to go just fine (save the long list of deprecation errors).
Anyone have an idea why my appli.css is not generating ?
How would I specify to ember-bootstrap to look for appli.less ? Is this possible ? If it is, it seems the code is here: https://github.com/ember-bootstrap/ember-bootstrap/blob/d98e054abd8ea172bbd47a81655ef300aeae7f87/blueprints/ember-bootstrap/index.js#L103
Maybe I'm being blocked here? https://github.com/ember-bootstrap/ember-bootstrap/blob/d98e054abd8ea172bbd47a81655ef300aeae7f87/blueprints/ember-bootstrap/index.js#L57
package.json
{
"name": "appli",
"version": "1.0.0",
"private": true,
"description": "Small description for appli goes here",
"repository": "",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"start": "ember serve",
"test": "ember test"
},
"devDependencies": {
"#ember/jquery": "^1.1.0",
"#ember/optional-features": "^2.0.0",
"#ember/test-helpers": "^2.6.0",
"#glimmer/component": "^1.0.4",
"#glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
"bootstrap": "^4.6.0",
"bootstrap-less-port": "^2.5.1",
"bootstrap-datepicker": "1.4.0",
"bootstrap-select": "1.7.4",
"broccoli-asset-rev": "^3.0.0",
"browserslist": "^4.21.0",
"codemirror": "^5.50.2",
"ember-ajax": "^5.0.0",
"ember-auto-import": "^1.12.0",
"ember-bootstrap": "^4.9.0",
"ember-cli": "^3.28.6",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-file-saver": "^1.2.4",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-copy": "^2.0.1",
"ember-data": "^3.28.6",
"ember-export-application-global": "^2.0.1",
"ember-fetch": "^8.1.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-moment": "^9.0.1",
"ember-page-title": "^6.2.2",
"ember-qunit": "^5.1.5",
"ember-resolver": "^8.0.3",
"ember-source": "~3.28.8",
"ember-template-lint": "^3.15.0",
"ember-welcome-page": "^4.1.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"handlebars": "3.0.3",
"loader.js": "^4.7.0",
"moment-duration-format": "2.2.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"select2": "4.0.4",
"underscore": "1.9.1",
"vis": "4.21.0"
},
"engines": {
"node": "12.* || 14.* || >= 16"
},
"dependencies": {
"datatables.net-dt": "^1.10.20",
"datatables.net-plugins": "^1.10.20",
"datatables.net-rowgroup-dt": "^1.1.1",
"less": "^3.13.1"
},
"ember": {
"edition": "octane"
}
}
ember-cli-build.js
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
'ember-bootstrap': {
bootstrapVersion: 4,
importBootstrapCSS: false,
},
'lessOptions': {
paths: ['node_modules/bootstrap/less'],
}
});
...
return app.toTree([imgJquery]);
app.less
#import "bootstrap-less-port";
#import "theme";
#import "variables";
#import "panels";
#import (less) "style.css";
#import (less) "datatable.css";
#import (less) "charts.css";
#import (less) "select2.css";
#import (less) "timeline.css";
#import (less) "codemirror.css";
#import (less) "vis-helios.css";
Action: Running
npm run build
Expected:
should generate the appli.css and vendor.css files within dist/assets
Observed:
app.less and app.css.map are present
vendor.css is present

ember cli dont compile with daterangepicker

I install ember-cli-daterangepicker. I did error server and this had working good, but I get error now. I install anything.
I do ember server and get it
File: ember-cli-daterangepicker/components/date-range-picker.js The
Broccoli Plugin: [broccoli-persistent-filter:Babel] failed with:
Error: incorrect header check
at Zlib._handle.onerror (zlib.js:370:17)
The broccoli plugin was instantiated at:
at Babel.Plugin (F:\Projects\tomaq\node_modules\broccoli-plugin\index.js:7:31)
at Babel.Filter [as constructor] (F:\Projects\tomaq\node_modules\broccoli-persistent-filter\index.js:62:10)
at new Babel (F:\Projects\tomaq\node_modules\broccoli-babel-transpiler\index.js:35:10)
at EmberApp._addonTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:913:29)
at EmberApp._processedVendorTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:947:20)
at EmberApp._processedExternalTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:978:21)
at EmberApp.appAndDependencies (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1087:30)
at EmberApp.javascript (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1217:34)
at EmberApp.toArray (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1646:10)
at EmberApp.toTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1668:30)
at module.exports (F:\Projects\tomaq\ember-cli-build.js:43:14)
at CoreObject.setupBroccoliBuilder (F:\Projects\tomaq\node_modules\ember-cli\lib\models\builder.js:72:19)
at CoreObject.init (F:\Projects\tomaq\node_modules\ember-cli\lib\models\builder.js:52:10)
at CoreObject.superWrapper [as init] (F:\Projects\tomaq\node_modules\core-object\lib\assign-properties.js:32:18)
at CoreObject.Class (F:\Projects\tomaq\node_modules\core-object\core-object.js:32:33)
at CoreObject.run (F:\Projects\tomaq\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at F:\Projects\tomaq\node_modules\ember-cli\lib\commands\serve.js:76:24
at tryCatch (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
How fix it problem?
My package.json
{
"name": "tomaq",
"version": "0.0.0",
"description": "Small description for tomaq goes here",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.10.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-daterangepicker": "0.6.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-g-maps": "0.5.14",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-lazy-load": "0.3.0",
"ember-cli-moment-shim": "3.5.0",
"ember-cli-pagination": "3.0.2",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.10.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-moment": "^7.3.1",
"ember-perfectscroll": "0.1.15",
"ember-resolver": "^2.0.3",
"ember-rx-shim": "0.1.4",
"ember-scrollable": "0.4.9",
"ember-simple-pagination": "1.0.1",
"ember-truth-helpers": "1.3.0",
"ember-welcome-page": "^1.0.3",
"gulp": "^3.8.0",
"gulp-compass": "^1.3.3",
"gulp-concat": "^2.2.0",
"gulp-ember-handlebars": "^0.6.0",
"gulp-imagemin": "^3.3.0",
"gulp-uglify": "^0.3.0",
"gulp-watch": "^0.6.5",
"loader.js": "^4.0.10"
},
"engines": {
"node": ">= 0.12.0"
},
"private": true,
"dependencies": {
"bootstrap": "^3.3.7",
"ember-bootstrap": "^1.0.0-beta.1",
"ember-i18n": "^5.0.1",
"ember-validations": "2.0.0-alpha.5",
"gulp": "^3.9.1",
"gulp-shell": "^0.6.3",
"gulp-uglifycss": "^1.0.8"
}
}
it's problem with cache in ember. It was related to running two ember-cli processes in parallel. Change BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT path
BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT=./dist-build-cache ember-cli build -prod
When I see zlib errors, I often need to either restart my ember server or clear my node_modules folder and re-install packages. Does that resolve things for you?

Ember-simple-auth how to depend on it in an addon?

I am developing several webapps, and so, I decided to create an addon with all the ccs and bootstrap, moment and other addons to be reused.
One addon I want to use in my foundation addon is ember-simple-auth.
I declared it in as dependency, but is not included in the project when I run.
And so, in the browser I get an error of missing files.
According to #marcoow where, this sould be enough.
Application package.json:
"devDependencies": {
"broccoli-asset-rev": "^2.6.0",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.14.2",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.3.0",
"ember-cli-dependency-checker": "^2.0.1",
"ember-cli-eslint": "^4.2.0",
"ember-cli-htmlbars": "^2.0.3",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-moment-shim": "^3.4.0",
"ember-cli-qunit": "^4.0.0",
"ember-cli-sass": "^7.0.0",
"ember-cli-shims": "^1.2.0-beta.2",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^2.0.0-beta.1",
"ember-data": "^2.14.3",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.4.0",
"ember-models-table": "^1.13.0",
"ember-simple-auth": "^1.4.0",
"ember-source": "^2.14.1",
"loader.js": "^4.6.0",
"universe-gui": "0.2.0"
},
Addon package.json:
"dependencies": {
"ember-cli-babel": "^6.8.1",
"ember-cli-flash": "^1.4.3",
"ember-cli-htmlbars": "^2.0.3",
"ember-cli-sass": "^7.0.0",
"ember-crumbly": "1.0.7",
"ember-i18n": "5.0.2",
"ember-moment": "7.3.0",
"ember-simple-auth": "^1.4.0",
"ember-truth-helpers": "1.3.0"
}
You can use the afterInstall hook in the default blueprint:
ember g blueprint name-of-your-addon
module.exports = {
normalizeEntityName: function() {},
afterInstall: function(options) {
return RSVP.all([
this.addPackageToProject('npm-package'),
this.addAddonToProject('ember-addon')
]);
}
};
I also struggled with this when developing an addon.
This article helped a lot (even though its somewhat outdated now), along with the official documentation.

Failed to start Ember after upgrade, es5-shim.js not found

I upgraded embercli, emberjs and ember data. After I run ember init. Then when I ember server, I got below stuff. I have tried to redo everything (upgrading). Same result. There is no error. Only a couple warnings when I upgrade embercli. I attached the warning at the end. I am not sure if they are relevant.
[jusfeel#localhost hillwave-ember-js]$ ember serve
version: 2.4.2
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
The Broccoli Plugin: [SourceMapConcat: Concat: Vendor /assets/vendor.js] failed with:
Error: ENOENT: no such file or directory, stat '/home/jusfeel/ember/hillwave-ember-js/tmp/source_map_concat-input_base_path-CxIUyeSW.tmp/0/bower_components/es5-shim/es5-shim.js'
at Error (native)
at Object.fs.statSync (fs.js:893:18)
at ConcatWithMaps.keyForFile (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:90:20)
at Array.map (native)
at ConcatWithMaps.CachingWriter._conditionalBuild (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:112:65)
at /home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/read_compat.js:61:34
at lib$rsvp$$internal$$tryCatch (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/home/jusfeel/ember/hillwave-ember-js/node_modules/rsvp/dist/rsvp.js:1198:9)
The broccoli plugin was instantiated at:
at ConcatWithMaps.Plugin (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/node_modules/broccoli-plugin/index.js:10:31)
at ConcatWithMaps.CachingWriter [as constructor] (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-caching-writer/index.js:21:10)
at new ConcatWithMaps (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-concat/concat.js:22:17)
at module.exports (/home/jusfeel/ember/hillwave-ember-js/node_modules/broccoli-concat/index.js:26:10)
at EmberApp.concatFiles (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:329:10)
at EmberApp.javascript (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1190:12)
at EmberApp.toArray (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1542:10)
at EmberApp.toTree (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1564:30)
at module.exports (/home/jusfeel/ember/hillwave-ember-js/ember-cli-build.js:38:14)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/jusfeel/ember/hillwave-ember-js/node_modules/ember-cli/lib/models/builder.js:55:19)
My bower.json
{
"name": "hillwave-ember-js",
"dependencies": {
"ember": "2.4.2",
"ember-cli-shims": "0.1.0",
"ember-cli-test-loader": "0.2.2",
"jquery": "~2.1.0",
"bootstrap": "~3.3.6",
"showdown": "~1.3.0",
"fastclick": "^1.0.6"
},
"resolutions": {
"ember": "2.3.1"
},
"devDependencies": {
"blanket": "~1.1.5",
"ember-qunit-notifications": "0.1.0"
}
}
My package.json
{
"name": "hillwave-ember-js",
"version": "0.0.0",
"description": "Small description for hillwave-ember-js goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.2.0",
"ember-ajax": "0.7.1",
"ember-cli": "^2.4.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-babel": "^5.1.5",
"ember-cli-blanket": "0.8.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-deploy": "0.5.1",
"ember-cli-deploy-build": "0.1.1",
"ember-cli-deploy-display-revisions": "0.1.1",
"ember-cli-deploy-revision-data": "0.1.1",
"ember-cli-deploy-rsync": "0.0.4",
"ember-cli-deploy-ssh-index": "0.2.0",
"ember-cli-document-title": "0.3.0",
"ember-cli-es5-shim": "^0.1.1",
"ember-cli-fastclick": "1.1.0",
"ember-cli-flash": "1.3.8",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "^1.2.1",
"ember-cli-release": "0.2.8",
"ember-cli-showdown": "2.5.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.4.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-i18n": "4.2.0",
"ember-infinity": "0.2.1",
"ember-lazy-image": "https://github.com/twokul/ember-lazy-image.git",
"ember-load-initializers": "^0.5.0",
"ember-page-object": "1.1.1",
"ember-resolver": "^2.0.3",
"ember-route-history": "0.1.3",
"ember-simple-auth": "1.0.1",
"ember-suave": "1.2.3",
"emberx-select": "2.0.2",
"fastclick": "1.0.6",
"graceful-fs": "^4.1.3",
"memory-scroll": "0.2.0"
},
"dependencies": {
"fonts.css": "^1.4.0",
"loader.js": "^4.0.0"
}
}
Some warnings when upgrade embercli from 2.2.0 to 2.4.2.
npm WARN deprecated lodash-node#2.4.1: This package has been discontinued in favor of lodash#^4.0.0.
npm WARN deprecated graceful-fs#3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs#^4.0.0 as soon as possible.
npm WARN prefer global marked#0.3.5 should be installed with -g
npm WARN prefer global npm#2.14.21 should be installed with -g
Edit
/*jshint node:true*/
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
minifyCSS: {
enabled: true,
compatibility: '-properties.backgroundSizeMerging'
}
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/bootstrap/dist/css/bootstrap.css');
app.import('bower_components/bootstrap/dist/css/bootstrap.css.map',{
destDir: 'assets'
});
app.import('vendor/royal_preloader/royal_preloader.css');
app.import('bower_components/bootstrap/dist/js/bootstrap.js');
app.import('vendor/royal_preloader/royal_preloader.min.js');
app.import('vendor/jquery.qrcode.min.js');
app.import('vendor/royal_preloader/config.js');
return app.toTree();
};
It's a mistake I made. When I do ember init, I didn't pay attention to remove es5-shim from package.json and left it there. That's why this issue caught me.
I guess I should be much much more careful when I do ember init like the release doc actually had warned.
The most common source of upgrade pain is missing changes in this
step.

ember build Parse error on line 1: {{#each messages as |message|}}

Hi I was attempting to update my ember cli project from ember 1.8.1 -> 1.9.1 & handlebar 1.3.0 -> 2.0.0 however now I get the following error, when I use the command ember build :
Build failed.
File: ui/templates/components/ember-notify.hbs
Parse error on line 1:
{{#each messages as |message|}} {{#vie
--------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'NUMBER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'DATA', 'SEP', got 'INVALID'
Error: Parse error on line 1:
{{#each messages as |message|}} {{#vie
--------------------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'NUMBER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'EQUALS', 'DATA', 'SEP', got 'INVALID'
at Object.parseError (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:106:11)
at Object.parse (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:158:22)
at HandlebarsEnvironment.parse (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:18:17)
at TemplateCompiler.EmberHandlebars.precompile (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/ember-template-compiler/vendor/ember-template-compiler.js:239:24)
at TemplateCompiler.processString (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/index.js:58:38)
at TemplateCompiler.Filter.processFile (/Users/shivamsinha/Desktop/Programming/workspace/feedserver/ui/node_modules/ember-cli-htmlbars/node_modules/broccoli-filter/index.js:136:31)
package.json
{
"name": "ui",
"version": "0.0.0",
"description": "Small description for ui goes here",
"private": true,
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
"build": "ember build",
"test": "ember test"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"bower": "^1.3.12",
"broccoli-asset-rev": "^2.0.0",
"broccoli-merge-trees": "^0.2.1",
"broccoli-static-compiler": "^0.2.1",
"ember-cli": "^0.1.11",
"ember-cli-babel": "^5.0.0",
"ember-cli-content-security-policy": "0.3.0",
"ember-cli-cookie": "^0.1.0",
"ember-cli-dependency-checker": "0.0.7",
"ember-cli-htmlbars": "^0.6.0",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-less": "^1.1.1",
"ember-cli-qunit": "0.3.1",
"ember-cli-simple-auth": "^0.7.3",
"ember-cli-simple-auth-oauth2": "^0.7.2",
"ember-cli-simple-auth-torii": "^0.8.0-beta.1",
"ember-cli-tooltipster": "0.0.6",
"ember-data": "1.0.0-beta.15",
"ember-export-application-global": "^1.0.0",
"ember-idx-button": "^0.1.3",
"ember-idx-forms": "^0.5.1",
"ember-mousetrap": "0.2.0",
"ember-notify": "^3.1.4",
"ember-template-compiler": "^1.9.0-alpha",
"express": "^4.8.5",
"glob": "^4.0.5",
"torii": "^0.3.3"
}
}
bower.json
{
"name": "ui",
"dependencies": {
"handlebars": "~2.0.0",
"jquery": "^1.11.1",
"ember": "1.9.1",
"ember-data": "1.0.0-beta.15",
"ember-resolver": "~0.1.11",
"loader.js": "ember-cli/loader.js#1.0.1",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.5",
"qunit": "~1.17.1",
"bootstrap": "~3.3.4",
"ember-addons.bs_for_ember": "~0.7.0",
"slick.js": "~1.4.0",
"jquery-mousewheel": "~3.1.12",
"videojs-youtube": "~1.2.8",
"tooltipster": "~3.3.0",
"ember-mousetrap": "~0.2.0",
"ember-validations": "2.0.0-alpha.3",
"rsvp": "~3.0.18",
"bootswatch": "v3.3.4+1",
"ember-simple-auth": "~0.7.3",
"progressbar.js": "~0.8.1",
"selectivity": "~1.1.0",
"select2": "~4.0.0",
"select2-bootstrap3-css": "~1.4.6",
"jquery-mentions": "~1.0.1",
"jquery-autocomplete": "~1.1.1",
"owl.carousel": "2.0.0-beta.2.4"
}
}
I think you might be using old version of HTMLBars and/or Ember CLI. You should upgrade to Ember CLI 0.2.7 from ^0.1.11(that's weird you're using ^ here, because upgrading from each version of Ember CLI requires some steps to take) and ember-cli-htmlbars to 0.7.6.
Here's the valid package.json file for latest versions of Ember and valid bower.json.
Check what version of Ember CLI you have installed currently, or please remove it completely, then update important package versions in package.json, bower.json to valid ones linked before. Then do setup steps and project update steps from Ember CLI releases site(clean cache etc.).