Im a begginer programmer that its still learning react native, in order to do it i must use expo. But whenever i tri to open in web the metro bundler the next error brings out in red letters :
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.node should be one of these:
false | object { __dirname?, __filename?, global? }
-> Include polyfills or mocks for various node stuff.
Details:
* configuration.node has an unknown property 'module'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dgram'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'dns'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'fs'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'http2'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'net'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'tls'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
* configuration.node has an unknown property 'child_process'. These properties are valid:
object { __dirname?, __filename?, global? }
-> Options object for node compatibility features.
So i want to open the metro bundler in expo but i dont know how :(. I already search in google and i just cant solve it.
I already try some things from this page, but they do not work
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema
Related
Syntax Error: ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.
options has an unknown property 'data'. These properties are valid:
object { implementation?, api?, sassOptions?, additionalData?, sourceMap?, webpackImporter?, warnRuleAsWarning? }
I tried removing the rule in my vue.js configuration
When I add ionic storage in my constructor it gives error 'Can't resolve all parameters for ProductPage: ([object Object], ?).'
in app module, I added IonicStorageModule.
This is my constructor. This code is page.
constructor(public service: ApiService, private storage: Storage) {
this.productData = [];
}
If I remove storage in the constructor app is working.
When i close and reopen the IDE it's worked.
I am trying to suppress my warnings in my tests following the config listed here: https://vue-test-utils.vuejs.org/api/config.html#silent, which is as follows:
import { config } from '#vue/test-utils';
// this should actually be the default but the default is not working
config.silent = true;
However, I am still seeing the warning in the test results:
TheQueue
✓ should show the queue bar if there are items queued
✓ should show the correct count of queued items in queued bar
[Vue warn]: Avoid mutating a prop directly since the value will be
overwritten whenever the parent component re-renders. Instead, use a
data or computed property based on the prop's value. Prop being
mutated: "mdTemplateData"
found in
---> <MdTab>
<MdContent>
<MdTabs>
<MdDrawer>
<TheQueue> at src/components/the-queue/TheQueue.vue
<Root>
It's worth noting that I do not see this error in normal usage of the app. This only pops up in tests (otherwise I would attempt to fix the actual suggested issue).
What am I doing wrong here and why can I not suppress these warning? Or am I misunderstanding what silent is supposed to do?
According to the VueJS docs - https://vue-test-utils.vuejs.org/api/config.html#silent
silent
type: Boolean
default: true
It suppresses warnings triggered by Vue while mutating component's
observables (e.g. props). When set to false, all warnings are visible
in the console. This is a configurable way which relies on
Vue.config.silent.
which relies on Vue.config.silent, so all you need is to import vue package and set it's config.silent to false
import Vue from `vue`
Vue.config.silent = true;
I put a working example here in my Github, it's just a fork of official example but it doesn't show warnings during the tests.
https://github.com/al1b/vue-test-utils-getting-started
For more information:
If you check the source code:
warn = (msg, vm) => {
const trace = vm ? generateComponentTrace(vm) : ''
if (config.warnHandler) {
config.warnHandler.call(null, msg, vm, trace)
} else if (hasConsole && (!config.silent)) {
console.error(`[Vue warn]: ${msg}${trace}`)
}
}
When I try to use either cold or hot functions from jasmine-marbles, I keep getting TypeError: Class constructor Observable cannot be invoked without 'new'. Anybody know how to resolve this error? Here is what I have below.
import { hot, cold } from "jasmine-marbles";
import { Observable } from "rxjs/Observable";
const myAction = hot("--a-", { a: "TEST" };
I started to get this error after i changed "target" property in tsconfig.json (at project root) to "es6", thus i restored to old good "es5"
Babel transpiled js works fine, but on IE11 the static inheritance seems not to work. Any idea?
class SuperClass {
constructor () {}
static test () {}
}
class Sub extends SuperClass {
constructor () {
super();
}
}
Sub.test(); //Results in: "Object doesn't support property or method 'test'
It seems that Babel does not handle the case, in fact in the inherits helper, if the Object.setPrototypeOf method is undefined, Babel simply attaches the super class to the __proto__ key.
I have managed this issue including this polyfill/workaround at the. At the moment, it seems to work fine, until the Babel team won't fix this behavior.