-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: when using memoize in react native #99
Comments
This is an issue with your config/environment, not with this package. https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c |
To help you with your search, this is because your configuration doesn't support the package.json |
This is my tsconfig.json. Can you help me fix it ? { |
Try stackoverflow or Facebook |
As shown above, memoize is missing a field called main in the package.json file, so can the author add a main field similar to the object below?
{
"name": "memoize",
"version": "10.0.0",
"description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
"license": "MIT",
"main": "dist",
"repository": "sindresorhus/memoize",
"funding": "https://github.com/sindresorhus/memoize?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava && npm run build && tsd --typings dist/index.d.ts",
"build": "del-cli dist && tsc",
"prepack": "npm run build"
},
"files": [
"dist"
],
"keywords": [
"memoize",
"function",
"mem",
"memoization",
"cache",
"caching",
"optimize",
"performance",
"ttl",
"expire",
"promise"
],
"dependencies": {
"mimic-function": "^5.0.0"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^5.0.0",
"@types/serialize-javascript": "^5.0.4",
"ava": "^5.3.1",
"del-cli": "^5.1.0",
"delay": "^6.0.0",
"serialize-javascript": "^6.0.1",
"ts-node": "^10.9.1",
"tsd": "^0.29.0",
"xo": "^0.56.0"
},
"ava": {
"timeout": "1m",
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm"
]
},
"xo": {
"rules": {
"@typescript-eslint/no-unsafe-return": "off"
}
}
}
The text was updated successfully, but these errors were encountered: