I did: create-react-app with --typescript flag
Then install react admin version 3.0
and I got this in console:
Could not find a declaration file for module 'react-admin'.
'.../node_modules/react-admin/lib/index.js' implicitly has an 'any' type.
Try `npm install #types/react-admin` if it exists or add a new declaration (.d.ts)
file containing `declare module 'react-admin';`
Any advice please or a guide please?
Related
I'm trying to use video.js in a Nuxt app. I ran yarn add video.js, which installed video.js and I can see it in package.json
In my page video.vue I added
import videojs from 'video.js'
vscode returns this error:
Could not find a declaration file for module 'video.js'. '../node_modules/video.js/dist/video.cjs.js' implicitly has an 'any' type.
Try npm i --save-dev #types/video.js if it exists or add a new declaration (.d.ts) file containing declare module 'video.js';
I followed the example on the official page for vue: https://videojs.com/guides/vue/
I'm new to React Native as such i need some help with a rather interesting problem. I'm trying to create a native module library to wrap some native ios/android api's. I followed some examples on the react site to do this but the issue i'm running into is how to package my created module so i can import the code into another react native app.
This is the error i'm running into while trying to use my newly created module.
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[7], "simple").DeviceModule.increment')
I create the package via npm pack, it generates a .tgz file which i attempt to install into my sample app via npm install but the end result is the error message above.
When attempting to use the module in my code i use the following: import { DeviceModule } from 'simple'; and this generates a warning:
Could not find a declaration file for module 'simple'. '/Users/aqureshi/Projects/React/ScanForensicsDemo/node_modules/simple/index.js' implicitly has an 'any' type. Try npm i --save-dev #types/simple if it exists or add a new declaration (.d.ts) file containing declare module 'simple';ts(7016)
So i'm not sure where to go from here, also worth mentioning that I created the native module via another RN "App" project, because when i try to create a library via create-react-native-library it would not work either.
Currently, I am modifying a chrome extension I have built to adding a popup page that is developed in Vue. I am using this tutorial, https://www.streaver.com/blog/posts/create-web-extension-vue.html.
Whenever I try the step vue init kocal/vue-web-extension my-extension, I get the following error:
vue-cli ยท ENOENT: no such file or directory, scandir '/Users/avidave/.vue-templates/kocal-vue-web-extension/template'
I have updated my vue-cli to the latest version so I am not sure what this really means. I know the file template doesn't exist, but I am not sure what is the right way to create the file in the kocal-vue-web-extension, or if it is needed for that matter.
Try This
vue create --preset kocal/vue-web-extension my-extension
I was trying to update react-navigation, and for that I deleted my node_modules folder.
But then it was complaining about crypto, so I reverted back the changes in my package.json, deleted my package-lock.json, but unfortunately can't get my old folder of node_modules as I deleted it permanently.
Is someone aware how to solve this issue?
Have tried all the possible solutions from this page like deleting cache, manually add modules by --save, but unfortunately no luck.
While trying to resolve module `crypto` from file `/PATH/TO/PROJECT/node_modules/crypto-js/core.js`, the package `/PATH/TO/PROJECT/node_modules/crypto/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`/PATH/TO/PROJECT/node_modules/crypto/index.js`. Indeed, none of these files exist:
* `/PATH/TO/PROJECT/node_modules/crypto/index.js(.native||.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)`
* `/PATH/TO/PROJECT/node_modules/crypto/index.js/index(.native||.ios.expo.ts|.native.expo.ts|.expo.ts|.ios.expo.tsx|.native.expo.tsx|.expo.tsx|.ios.expo.js|.native.expo.js|.expo.js|.ios.expo.jsx|.native.expo.jsx|.expo.jsx|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.wasm|.native.wasm|.wasm)`
ERROR
10:34
Building JavaScript bundle: error
Would really appreciate any help.
I'm using aws-sdk module which I think is using crypto-js, and that's what's causing this issue.
DO NOT USE THIS VERSION! Please, go for a newer version!
It says in the official document.
Please go with the newer version 4.0.0
crypto-js (npm package)
I have a problem "Unable to resolve module".
// Please, read the question before publish comments with links for first result from google.
This is the import line where I got the error:
import Interactor from 'react-native-native-orientation-interactor';
What I did:
Create a react-native library
Run npm link inside the library folder
Run npm link react-native-native-orientation-interactor inside a demo react-native app
Add import statement
Got the error with import.
If I press Cmd+B on import statement I can open a file from node_modules folder. Also I can see my library (as a link) inside node_modules.
But I didn't find any solution for me.
Upd1: I added my library as a dependency in package.json
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-native-orientation-interactor": "*"
},
1 - First of all you have written double native in react-native-native-orientation-interaction
2 - Another thing is, don't add dependencies manually..
Use Proper installation guide like
npm install --save react-native-orientation-interactor
or
yarn add react-native-orientation-interactor
then link the dependency.
3 - And actually I didn't get any module named 'react-native-orientation-interaction'.
react-native-orientation
here is the one of valid module dependency.
always read the whole proper Documentation.( Correct me if I am wrong)
If you are able to link your package correctly, and problem still persists.
From my experience you can do two things to resolve error.
1) Try to install pod in ios/ directory
or
2) Just close the Termianl and re-run