_.assign is not a function
See original GitHub issueThere’s an issue with lodash not being loaded up or included, either in the bower_components or node_modules, I’m not sure which.
We’re using version 0.11.1 of ember-cli-mirage.
TypeError: _.assign is not a function
at Function.exports.default [as extend] (http://localhost:4201/assets/vendor.js:159193:7)
at http://localhost:4201/assets/vendor.js:158829:46
at mod.state (http://localhost:4201/assets/vendor.js:150:29)
at tryFinally (http://localhost:4201/assets/vendor.js:30:14)
at requireModule (http://localhost:4201/assets/vendor.js:148:5)
at requireFrom (http://localhost:4201/assets/vendor.js:121:12)
at reify (http://localhost:4201/assets/vendor.js:106:22)
at mod.state (http://localhost:4201/assets/vendor.js:149:17)
at tryFinally (http://localhost:4201/assets/vendor.js:30:14)
at requireModule (http://localhost:4201/assets/vendor.js:148:5)
Here’s how our dependencies in package.json looks:
"devDependencies": {
"body-parser": "^1.2.0",
"bower": "^1.6.3",
"broccoli-asset-rev": "^2.0.2",
"broccoli-concat": "0.0.13",
"broccoli-merge-trees": "^0.2.1",
"broccoli-replace": "^0.1.7",
"broccoli-static-compiler": "0.2.1",
"broccoli-svgstore": "^0.1.0",
"chalk": "0.4.0",
"ember-cli": "0.2.5",
"ember-cli-app-version": "0.3.3",
"ember-cli-async-button": "^0.3.1",
"ember-cli-autoprefixer": "^0.3.0",
"ember-cli-babel": "^5.0.0",
"ember-cli-chartist": "^0.2.9",
"ember-cli-coffeescript": "~0.0.7",
"ember-cli-dependency-checker": "^1.0.0",
"ember-cli-htmlbars": "0.7.6",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-mirage": "0.1.11",
"ember-cli-pretender": "0.0.5",
"ember-cli-qunit": "0.3.13",
"ember-cli-sass": "^4.0.0",
"ember-cli-showdown": "2.1.4",
"ember-cli-simple-auth": "0.6.7",
"ember-cli-simple-auth-oauth2": "0.6.7",
"ember-cli-uglify": "^1.2.0",
"ember-cli-zero-clipboard": "^1.0.2",
"ember-data": "1.0.0-beta.17",
"ember-disable-proxy-controllers": "^0.7.0",
"ember-export-application-global": "^1.0.2",
"ember-list-view": "0.0.6",
"ember-multiselect-checkboxes": "^0.3.1",
"ember-select-2": "^1.2.0",
"ember-sortable": "1.6.2",
"express": "^4.8.5",
"glob": "^4.4.0",
"grunt": "^0.4.5",
"grunt-aws-s3": "^0.9.4",
"http-proxy": "^1.1.6",
"mirage": "0.0.5",
"node-sass": "^3.3.2",
"originate": "0.1.5",
"sync-exec": "^0.5.0"
}
Here’s how our dependencies in bower.json looks:
"dependencies": {
"accounting": "~0.3.2",
"animate.css": "~3.2.0",
"autofill-event": "~1.0.0",
"bootstrap": "~3.2.0",
"chartkick": "~1.3.0",
"dropzone": "uniiverse/dropzone#3.10.3",
"ember-simple-auth": "0.6.7",
"ember-validations-shiv": "uniiverse/ember-validations-shiv",
"highcharts": "~4.1.4",
"intercom": "edude03/intercom.js#fix-intercom-with-bower",
"jquery-color": "~2.1.2",
"jquery-form": "~3.46.0",
"jquery.payment": "~1.2.2",
"moment": "~2.7.0",
"papaparse": "~4.1.0",
"select2": "3.5.2",
"select2-bootstrap-css": "~1.4.6",
"sockjs": "~0.3.4",
"svg4everybody": "~1.0.0",
"thousandwords": "0.1.9",
"underscore": "~1.7.0",
"underscore.inflection": "~1.1.1",
"underscore.string": "~2.3.3",
"ember": "1.12.0",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.0.0-beta.18",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
"ember-qunit": "0.3.3",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.15",
"jquery": "^1.11.1",
"loader.js": "ember-cli/loader.js#3.2.0",
"qunit": "~1.17.1",
"jquery.easing": "~1.3.1",
"chartist": "~0.9.4",
"jquery.kinetic": "~2.1.0",
"keen-js": "3.2.7",
"jquery-ui": "~1.11.4",
"pretender": "~0.10.1",
"lodash": "~3.7.0",
"Faker": "~3.0.0"
}
In a separate project using v0.11.1 I was able to get the tests running without this error message. It’s only in my particular project where I get this “_.assign is not a function” error message. I’m pretty sure it’s a dependency or build issue.
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Object.assign is not a function - Stack Overflow
I'm using babel with gulp and create a simple DOM library in ES6. But after running and when i'm going to use it,...
Read more >TypeError: _.assign is not a function · Issue #407 - GitHub
While using Approximate String Matching function, I got this error. TypeError: _.assign is not a function at Object.
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >Javascript – Object.assign is not a function - iTecNote
I'm using babel with gulp and create a simple DOM library in ES6. But after running and when i'm going to use it,...
Read more >The "that._parse(...).assign is not a function" error occurs if two ...
I have attached a scenario that I have encountered where I want to drive the enabled state of a button based on whether...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m no longer able to build my app after this push (0.1.12). Getting ‘Cannot read property ‘path’ of undefined’ https://travis-ci.org/ilios/frontend#L1902 Maybe something about using NPM v3?
Should be fixed with 0.1.13