Argument of type 'DeepPartial<S>' is not assignable to parameter of type 'PreloadedState<S>' - redux

I have "#reduxjs/toolkit": "1.4.0", and "redux": "4.0.5"
Getting an error with the type of preloadedState in configureStore.ts.

It's really likely that you've got multiple conflicting redux dependencies. You can probably resolve this by:
Remove the redux dependency as it's unnecessary - #reduxjs/toolkit will include it for you
Purge your node_modules
Remove your lock file
Reinstall

Related

Webpack CSS #import issue 'Module parse failed: Unexpected character '#' (1:0)'

i am having an issue with webpack and my css file. Whenever i run "npm start", i get this error :
ERROR in ./ticker.css 1:0
Module parse failed: Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.
I read that it requires a loader for css files however i have installed 'style-loader' and 'css-loader' but apparently it still won't work. Any ideas ?
Here is :
webpackconfig, package file, ticker.css file
Thanks guys !
I tried to delete and recreate the node_modules directory, use raw loader, change the loaders order.
Turned out my node.js version wasn't up to date which caused some conflicts with some packages. Think about updates guys. :)

Module '"vue"' has no exported member 'reactive'

I am using "vue": "^3.0.0" and trying to use some Reactivity in Depth from vue. But got error
Module '"vue"' has no exported member 'reactive'
Module '"vue"' has no exported member 'ref'
Even document here: https://v3.vuejs.org/guide/reactivity.html#what-is-reactivity
More detail packages
"vue-class-component": "^8.0.0-0",
"vue-property-decorator": "^9.1.2",
...
"#vue/compiler-sfc": "^3.0.0",
One of your dependencies is not compatible with Vue 3 - requiring Vue 2. So you have installed both versions.
You can try execute npm explain vue to find out which one is it...
For whoever comes across this question, is using pnpm and running into this issue with all Vue exports, like:
Problems:
TS2305: Module '"vue"' has no exported member 'defineComponent'.
TS2305: Module '"vue"' has no exported member 'Component'.
TS2305: Module '"vue"' has no exported member 'Ref'.
TS2305: Module '"vue"' has no exported member 'ref'.
I noticed I had "preserveSymlinks": true in my tsconfig.json, removing it (or setting it to false) cleared the errors.
// tsconfig.json
{
// ...
"compilerOptions": {
// ...
"preserveSymlinks": false // no more errors ✅
}
}

How to fix: "deno error: Cannot resolve module 'x'"

I've got an error like so:
error: Cannot resolve module "<path>/src/routes" from "<path>/src/index.ts"
Imported from "file:///F:/Development/k8demo/api-deno/src/index.ts:2"
My problem was that Deno requires a .ts extension for imports unlike node.
Fix by adding .ts to the import.

Cannot read property 'manifest' of undefined Error in Ionic

I am trying to login Facebook with Firebase. I have installed all the libraries required and completed the required configuration. Still, whenever I try to start my app it is giving me this error:
(node:11160) UnhandledPromiseRejectionWarning: TypeError: Cannot read
property 'manifest' of undefined
at removeOldOptions (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova- universal-links-plugin\hooks\lib\android\manifestWriter.js:48:32)ished in 37.33 s
at Object.writePreferences
(C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-
plugin\hooks\lib\android\manifestWriter.js:27:19)
at activateUniversalLinksInAndroid
(C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:65:25)
at C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:45:11
at Array.forEach (<anonymous>)
at run (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:41:17)
at module.exports (C:\Users\Dell\Desktop\firebaseapp\plugins\cordova-universal-links-plugin\hooks\afterPrepareHook.js:18:3)
at runScriptViaModuleLoader (C:\Users\Dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:188:18)
at runScript (C:\Users\Dell\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:164:16)
(node:11160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Able to solve this with below changes :
Just go to the below file in Ionic
plugins/cordova-universal-links-plugin/hooks/lib/android/manifestWriter.js
I fixed issue by changing pathToManifest as below:
var pathToManifest = path.join(cordovaContext.opts.projectRoot, 'platforms', 'android', 'cordovaLib', 'AndroidManifest.xml');
to
var pathToManifest = path.join(
cordovaContext.opts.projectRoot,
'platforms',
'android',
'app',
'src',
'main',
'AndroidManifest.xml');
For anyone that's looking into this these days, the actual fix for this was published by someone which you can pull in as a cordova plugin https://github.com/nordnet/cordova-universal-links-plugin/issues/133#issuecomment-369260863
#okaufmann you can use the changed version of the plugin. since it's not merged in the nordnet repository, you must remove the plugin and install again using:
cordova plugin add https://github.com/walteram/cordova-universal-links-plugin
After doing...
cordova plugin rm cordova-universal-links-plugin
cordova plugin add https://github.com/walteram/cordova-universal-links-plugin
.. my project was able to build successfully.
You need to update the AndroidManifest path in the plugin, which seems to be outdated. Check out this:
https://github.com/nordnet/cordova-universal-links-plugin/issues/146

SBT support for custom ivy module status?

In my SBT build I have a dependency on an ivy artifact that makes use of a custom module status. This causes the following error in SBT:
[error] (*:update) sbt.ResolveException: unresolved dependency: my-org#myapp-core_2.11;1.0: java.text.ParseException: inconsistent module descriptor file found in 'http://artifacts.myorg.com/libs-snapshots-local/myapp-core_2.11/1.0/myapp-ivy.xml': bad status: 'snapshot';
I can work around this by telling SBT to use an external ivy settings, like so:
externalIvySettings(baseDirectory(_ / "ivySettings.xml"))
And then create an ivySettings.xml containing the following:
<statuses default="release">
<status name="release" integration="false"/>
<status name="snapshot" integration="false"/>
</statuses>
But surely there must be a better way? The problem with this work around is that now all my settings (such as resolvers) have to be in the ivy file too, because (IFAIK) it's all or nothing when you use externalIvySettings.
Is there a way to specify a set of custom statuses within my build.sbt? Or alternatively is there a way to tell sbt to combine external ivy settings with the ones it generates from the build.sbt.
Since specifying custom module statuses is a valid thing to do in ivy, this should really be supported in sbt too.
This is because for some repositories, they use non-standard status which fails the consistency check. We addressed this by constructing the customized resolver which doesn't do consistency check. You can also construct resolver with the custom status using the same approach. The following is the working snippet.
resolvers += {
val resolver = new org.apache.ivy.plugins.resolver.IBiblioResolver
resolver.setName("Custom Ivy Snapshots")
resolver.setRoot("http://Custom/snapshots/")
val settings = new org.apache.ivy.core.settings.IvySettings()
settings.setVariable("ivy.local.default.ivy.pattern", Pattern)
settings.setVariable("ivy.local.default.artifact.pattern", Pattern)
resolver.setSettings(settings)
resolver.setM2compatible(true)
resolver.setCheckconsistency(false)
new RawRepository(resolver)
}

Resources