DEPRECATION: ComputedProperty.cacheable() when upgrading to ember 1.10 - ember.js

I recently upgraded ember 1.9 to 1.10 and get this:
DEPRECATION: ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.
however I don't see any uses of this in my code. I'm in an ember cli 0.12.0 project
bower
{
"name": "proj",
"dependencies": {
"jquery": "^1.11.1",
"ember": "1.10.0",
"ember-data": "1.0.0-beta.12",
"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.4",
"qunit": "~1.15.0"
}
}
Stacktrace:
DEPRECATION: ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.
at Descriptor.ComputedPropertyPrototype.cacheable (http://localhost:4201/assets/vendor.js:21101:13)
at http://localhost:4201/assets/vendor.js:73759:10
at requireModule (http://localhost:4201/assets/vendor.js:64433:29)
at reify (http://localhost:4201/assets/vendor.js:64404:22)
at requireModule (http://localhost:4201/assets/vendor.js:64432:17)
at reify (http://localhost:4201/assets/vendor.js:64404:22)
at requireModule (http://localhost:4201/assets/vendor.js:64432:17)
at http://localhost:4201/assets/vendor.js:77306:14
at http://localhost:4201/assets/vendor.js:77307:4
seems to print the dep when this line runs at the ember data loading..
reified = reify(mod.deps, name, seen[name]); at 64432

Moving to both bower and package
"ember-data": "1.0.0-beta.14.1"
fixes this issue

Related

Compojure with Datomic won't compile

I'm setting up a compojure app, and I want to have datomic as my database - but as soon as I add the client-pro dependency, my app won't run.
Here's what I did:
Registered for an account
Downloaded datomic-pro
Created a transactor.properties and updated it with the license-key I received on my email
Ran bin/transactor transactor.properties
Opened another tab, and created a database:
(require ‘[datomic.api :as d])
(def db-uri “datomic:dev://localhost:4334/hello”)
(d/create-database db-uri)
Started a peer server on another tab
bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d hello,datomic:dev://localhost:4334/hello
Added [com.datomic/client-pro “0.8.28”] to my dependencies
When running lein ring server I am getting this error:
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.thread.NonBlockingThread
A Quick Aside
Not a direct answer, but if you are just looking for a fast start with Datomic, you can clone the Tupelo Datomic repo here:
https://github.com/cloojure/tupelo-datomic
It includes a pre-configured version of Datomic Free. Just run lein test to see it in action. You can then add your own code.
Regarding Jetty
The answer from Erwin may be all you need. Another possibility is that you may need to add in transitive dependencies at specific versions, and use :exclude on others. Please also note that in project.clj important deps MUST be listed at the top of the file, as these deps versions (and their transitive deps versions) WILL OVERRIDE any deps versions specified later.
I have lein deps for one project that look like this in project.clj:
:exclusions [cheshire
com.cognitect/transit-clj
com.cognitect/transit-cljs
com.cognitect/transit-java
com.cognitect/transit-js
com.fasterxml.jackson.core/jackson-core
com.fasterxml.jackson.core/jackson-databind
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
com.fasterxml.jackson.dataformat/jackson-dataformat-smile
joda-time/joda-time
org.eclipse.jetty/jetty-server]
:dependencies [
; fundamental items must come first to override later transitive dependencies
[cheshire "5.8.1"]
[com.cognitect/transit-clj "0.8.313"]
[com.cognitect/transit-cljs "0.8.256"]
[com.cognitect/transit-java "0.8.337"]
[com.cognitect/transit-js "0.8.861"]
[com.fasterxml.jackson.core/jackson-core "2.9.9"]
[com.fasterxml.jackson.core/jackson-databind "2.9.9"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.9.9"]
[com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.9.9"]
[joda-time/joda-time "2.10.3"]
[org.clojure/clojure "1.10.1"]
[org.eclipse.jetty/jetty-server "9.4.19.v20190610"]
then a list of 2nd-tier deps:
; high-priority libs, ensure these versions override any transitive dependency versions
[binaryage/devtools "0.9.10"]
[binaryage/oops "0.7.0"]
[com.andrewmcveigh/cljs-time "0.5.2"]
[com.cemerick/url "0.1.1"]
[org.clojure/core.async "0.4.500" :exclusions [org.clojure/tools.reader]]
[org.clojure/core.match "0.3.0"]
[org.clojure/test.check "0.9.0"]
[org.clojure/tools.cli "0.4.2"]
[org.clojure/tools.logging "0.5.0"]
[org.clojure/tools.nrepl "0.2.13"] ; #todo #awt upgrade => [nrepl "0.3.1"] from https://github.com/nrepl/nrepl
[prismatic/schema "1.1.11"]
[tupelo "0.9.144"]
[venantius/accountant "0.2.4"]
then 3nd-tier deps:
; "normal" dependency libs, whose transitive dependencies can be overridden by previous libs
[ch.qos.logback/logback-classic "1.2.3"]
[clj-http "3.10.0"]
[clj-time "0.15.1"] ; #todo switch to java.time & tupelo.java-time
[cljsjs/cytoscape "3.1.4-0"]
[com.amazonaws/aws-java-sdk "1.11.602" :exclusions [joda-time]]
[com.taoensso/carmine "2.19.1"]
[compojure "1.6.1"]
[cprop "0.1.14"]
[expound "0.7.2"]
[funcool/struct "1.4.0"]
[io.janusplatform/janus-environment-config "1.8.7-SNAPSHOT"]
[io.janusplatform/janus-logging-java "1.0.11-SNAPSHOT" :exclusions [com.google.guava/guava]]
[io.janusplatform/janus-resource-connector "4.3.0-SNAPSHOT"]
[jayq "2.5.5"]
[luminus-jetty "0.1.7" ]
[luminus-nrepl "0.1.6"]
[luminus/ring-ttl-session "0.3.3"]
[markdown-clj "1.10.0"]
[metosin/muuntaja "0.2.1"]
[metosin/ring-http-response "0.9.1"]
[metosin/spec-tools "0.10.0"]
[metosin/scjsv "0.5.0"]
[metrics-clojure-ring "2.10.0"]
[mount "0.1.16"]
[org.webjars/bootstrap "4.3.1"]
[org.webjars/font-awesome "5.9.0"]
[overtone/at-at "1.2.0"]
[ring-webjars "0.2.0"]
[ring/ring-codec "1.1.2"]
[ring/ring-core "1.7.1"]
[ring/ring-defaults "0.3.2"]
[ring/ring-json "0.4.0"]
[throttler "1.0.0"]
and some misc deps:
[amazonica "0.3.145" :exclusions [com.amazonaws/aws-java-sdk
com.fasterxml.jackson.core/jackson-core
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
org.apache.httpcomponents/httpclient]] ; #todo do we really need all these exclusions???
[cljs-ajax "0.8.0" :exclusions [cheshire
com.cognitect/transit-clj
com.cognitect/transit-java
org.apache.httpcomponents/httpasyncclient
org.apache.httpcomponents/httpcore
org.msgpack/msgpack]] ; #todo do we really need all these exclusions???
[org.springframework/spring-webmvc "5.1.8.RELEASE" :exclusions [org.springframework/spring-jcl
org.springframework/spring-aop]]
]
You can also see I had to exclude Jetty to prevent a transitive dependency from pulling in the wrong version, then specifically add in the version I wanted.

How to enable debug in Semantic-UI-React?

I'm using Semantic-UI in my react project.
It works well. but sometimes it shows error in during unit testing with Jest.
This is the error message
console.error node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:25
Semantic-UI-React could not enable debug.
console.error node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:26
TypeError: Cannot read property 'debug' of undefined
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:22:33)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/lib/index.js:77:14)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/addons/Responsive/Responsive.js:43:12)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/addons/Responsive/index.js:8:19)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/index.js:7:19)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/src/FamilyViewWithController/index.js:4:24)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/src/FamilyViewWithController/index.test.js:1:232)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at jasmine2 (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-jasmine2/build/index.js:97:11)
at runTest (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/build/runTest.js:85:10)
at module.exports (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/build/TestWorker.js:87:5)
at handle (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/worker-farm/lib/child/index.js:51:3)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
It's very wierd.
- sometimes it appears, sometimes it doesn't
- sometimes it appears in a component, sometimes it doesn't appear in that component.
- it doesn't appear with small amount of components. but it appears with a lot of components.
- but the tests always are passed even if this issue appears.
The test command that I'm using is
CI=true NODE_ENV=test react-scripts test --env=jsdom --no-cache
any thoughts about that? I do want your team to solve this issue or let me know how to fix it.
Regards.
It's a bug, was fixed in https://github.com/Semantic-Org/Semantic-UI-React/pull/3485 and released in 0.86.0.

Setup test for Vue.js-electron app which uses Vuex

I want to setup the following Component and want to run the following basic unit test on it.
(I'm new to Vue.js and not sure which information is valuable for solving my question. Please ask if some other specific code parts would help you to help me.)
user-information.vue:
<template>
<v-layout row wrap justify-center id="wrapper">
<v-flex class="text-xs-center centered">
<v-card>
<v-card-title primary class="title">
User Management
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed: mapState({
users: state => state.userStore.users,
status: state => state.userStore.status
}),
created() {
this.$store.commit('userStore/setDefaultUserStatus');
this.$store.dispatch('userStore/getAllUsers');
},
methods: {
deleteUser
this.$store.commit('userStore/setDefaultUserStatus');
if (confirm('Are you sure?')) {
this.$store.dispatch('userSTore/deleteUser', userId);
}
}
}
}
</script>
LandingPage.spec.js:
import { mount } from '#vue/test-utils';
import UserInformation./../../src/renderer/components/User/user-information.vue';
describe('user-information.vue', () => {
test('is a Vue instance', () => {
const wrapper = mount(UserInformation);
expect(wrapper.isVueInstance()).toBeTruthy();
});
});
When I run npm test, I get the following error:
$ npm test
> management-system#0.1.0 test /home/juri/develop/management-system
> jest
FAIL test/e2e/specs/Launch.spec.js
● Test suite failed to run
Your test suite must contain at least one test.
at node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:256:22
FAIL test/unit/specs/LandingPage.spec.js
● Console
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in config.errorHandler: "TypeError: Cannot read property 'commit' of undefined"
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'commit' of undefined
at VueComponent.created (/home/juri/develop/management-system/src/renderer/components/USer/user-information.vue:85:1)
at callHook (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2919:21)
at VueComponent.Vue._init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4628:5)
at new VueComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4796:12)
at createComponentInstanceForVnode (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4308:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4129:45)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in created hook: "TypeError: Cannot read property 'commit' of undefined"
found in
---> <Anonymous>
<Root>
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'commit' of undefined
at VueComponent.created (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:85:1)
at callHook (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2919:21)
at VueComponent.Vue._init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4628:5)
at new VueComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4796:12)
at createComponentInstanceForVnode (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4308:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4129:45)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in config.errorHandler: "TypeError: Cannot read property 'state' of undefined"
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (/home/juri/develop/management-system/node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in render: "TypeError: Cannot read property 'state' of undefined"
found in
---> <Anonymous>
<Root>
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (/home/juri/develop/management-system/node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
● user-information.vue › is a Vue instance
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (test/unit/specs/LandingPage.spec.js:26:21)
Test Suites: 2 failed, 2 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.625s
Ran all test suites.
npm ERR! Test failed. See above for more details.
What can I do to solve this error and what is the source of it? As far as I can think of, it looks like it has something to do with Vuex, because it's complaining because of commit() and dispatch() (Vuex-functions). But I'm confused - I'm using no data which is stored in the store in my simple test.
It looks like you need to instantiate Vuex within the test.
Your component has this created() hook, so just by creating it you are referencing the vuex instance.
created() {
this.$store.commit('userStore/setDefaultUserStatus');
this.$store.dispatch('userStore/getAllUsers');
},
You can use createLocalVue() to get an isolated Vue instance, and add Vuex to it, then pass it via mountOptions to mount().
You can also mock the store so that other tests have control over the data.
import Vuex from 'vuex'
import { mount, createLocalVue } from '#vue/test-utils'
const localVue = createLocalVue()
localVue.use(Vuex)
const storeOptions = {
state: ...
getters: ...
mutations: ...
};
const mockStore = new Vuex.Store(storeOptions)
describe('user-information.vue', () => {
let wrapper;
beforeEach(() => {
const mountOptions = {
localVue,
store: mockStore
}
wrapper = mount(UserInformation, mountOptions)
});
test('is a Vue instance', () => {
expect(wrapper.isVueInstance()).toBeTruthy();
});
});

How to track down an "Uncaught Error: Could not find module `#ember/component`" error?

I've updated the addon ember-attacher in my ember project from v0.11.4 to v0.13.0 and now i'm getting the below error:
Uncaught Error: Could not find module `#ember/component` imported from `#ember-decorators/argument/-debug/validated-component`
at missingModule (loader.js:247)
at findModule (loader.js:258)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
I think there is some problem with #ember/component not available/loaded yet, when ember-decorators wants to use it. But i don't know how to track down what's causing the issue.
There are no other problems/execptions besides the module error (only some caught ones from babel-polyfill).
Deleting node_modules for a fresh dependencies installation didn't changed anything. It also happens in both, production and delevopment build.
I also tried to reproduce the same issue in a fresh ember-cli project, but didn't managed to do so (created an empty project, added all the same dependencies and config settings, created a test page showing an ember-attacher tooltip and popover).
So it must be a special case, but i don't know what causes the problem.
How can i get more insight about why the error occurs? Are there any hints available from debbuging, which i didn't recognized?
I can't provide a repository of our project, but may be able to provide individual code parts, if specific information is needed.
ember -v --verbose:
ember-cli: 2.17.0
http_parser: 2.7.0
node: 8.9.1
v8: 6.1.534.47
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2m
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b
os: win32 x64
Dependencies:
"broccoli-asset-rev": "^2.6.0",
"ember-ajax": "^3.0.0",
"ember-attacher": "^0.13.0",
"ember-chrome-devtools": "^0.2.0",
"ember-cli": "~2.17.0",
"ember-cli-app-version": "^3.1.3",
"ember-cli-autoprefixer": "^0.8.1",
"ember-cli-babel": "^6.10.0",
"ember-cli-dependency-checker": "^2.1.0",
"ember-cli-eslint": "^4.2.2",
"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.5.0",
"ember-cli-qunit": "^4.1.1",
"ember-cli-sass": "^7.1.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-helpers": "1.5.0",
"ember-cli-uglify": "^2.0.0",
"ember-cli-windows-addon": "^1.3.1",
"ember-cli-yuidoc": "^0.8.8",
"ember-composable-helpers": "^2.0.3",
"ember-cp-validations": "^3.5.1",
"ember-crumbly": "^2.0.0-alpha.1",
"ember-data": "~2.17.0",
"ember-debounced-properties": "0.0.5",
"ember-drag-drop": "^0.4.6",
"ember-export-application-global": "^2.0.0",
"ember-intl": "^2.31.1",
"ember-intl-cp-validations": "^3.0.1",
"ember-load-initializers": "^1.0.0",
"ember-md5": "^1.0.1",
"ember-moment": "^7.5.0",
"ember-paper": "~1.0.0-beta.3",
"ember-pikaday": "^2.2.3",
"ember-pouch": "^4.3.0",
"ember-promise-helpers": "^1.0.3",
"ember-resolver": "^4.5.0",
"ember-responsive": "^2.0.5",
"ember-route-action-helper": "^2.0.6",
"ember-shepherd": "^2.8.0",
"ember-simple-auth": "^1.4.0",
"ember-source": "~2.17.0",
"ember-tether": "^1.0.0-beta.0",
"ember-timepicker": "^0.2.0",
"ember-transition-helper": "^0.0.6",
"ember-truth-helpers": "^2.0.0",
"ember-user-activity": "^0.9.0",
"ember-uuid": "^1.0.0",
"ember-wormhole": "^0.5.3",
"eslint": "^4.12.1",
"eslint-plugin-ember": "^5.0.1",
"loader.js": "^4.6.0",
"paper-time-picker": "^0.1.15",
"pouchdb-authentication": "^0.5.5",
"string_score": "^0.1.22",
"yuidoc-ember-theme": "^1.4.0"
Any help or tipps are appreciated. Already thanks for taking the time to read my post.

Visual Studio 2017 csproj .NET CORE netstandard2.0 not building

I just installed VS2017 and did the one way migration of my .NET core projects from the project.json format to the new csproj format. What I want is to target multiple frameworks so I can build a Framework Depedenent Deployment and a Self Contained Deployment using a smaller footprint. I followed the directions on the MS docs, but when I include netstandard1.6 or netstandard2.0 in the TargetFrameworks, I get a whole slew of Predefined type System.Object is not defined and The type of namespace System could not be found among others when I try and build the project. This worked when it was using the project.json file. My csproj is
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<VersionPrefix>1.0.0.0</VersionPrefix>
<TargetFrameworks>netcoreapp1.2;netstandard2.0</TargetFrameworks>
<AssemblyName>App</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>App</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.2' ">1.1.1</RuntimeFrameworkVersion>-->
<NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">1.6.1</NetStandardImplicitPackageVersion>
<RuntimeIdentifiers>win10-x64;android.21;android21-arm64;osx.10.12;rhel7.4;centos.7-x64;debian8-x64;ubuntu16.10-x64;fedora.26-x64;opensuse.42.1-x64</RuntimeIdentifiers>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute
</PropertyGroup>
<ItemGroup>
<None Remove="App.csproj.vspscc" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR" Version="1.1.0" />
</ItemGroup>
</Project>
My original project.json
{
"version": "1.0.0.0",
"buildOptions": {
"emitEntryPoint": true
},
"frameworks": {
"netcoreapp1.2": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
}
},
"netstandard2.0": {
"dependencies": {
"NETStandard.Library": {
"version": "1.6.1"
},
"System.Threading.Thread": "4.3.0",
"Microsoft.NETCore.Runtime.CoreCLR": "1.1.0"
}
}
},
"runtimes": {
"win10-x64": {}
"ubuntu.16.10-x64": {},
"centos.7-x64": {},
"debian.8-x64": {},
"fedora.24-x64": {},
"opensuse.42.1-x64": {},
"osx10.12-x64" : {}
}
}
Not sure what the problem is. Am I trying to do something unsupported? If I have just netcoreapp1.2, when I do a dotnet publish -c Release -r win10-x64 I still get a FDD output, not a standalone executable. I feel like this was way easier with the json file... What am I doing wrong?
I got the same error message when the Nuget-packages were not restored. Have you made sure the packages are restored properly, and that no errors appear if you run "dotnet restore"?