728x90
반응형
* package-lock.json 파일 삭제 후, package.json 을 최신 버전들로 재설치 (npm install) 후 실행 시 에러 발생
error: Error: Unable to resolve module html-parse-stringify2 from /Users/.../react-native/node_modules/react-i18next/dist/commonjs/Trans.js: html-parse-stringify2 could not be found within the project or in these directories:
node_modules
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
> 1 | "use strict";
2 |
3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4 |
at ModuleResolver.resolveDependency (/Users/.../react-native/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:129:15)
at DependencyGraph.resolveDependency (/Users/.../react-native/node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
at Object.resolve (/Users/.../react-native/node_modules/metro/src/lib/transformHelpers.js:129:24)
at resolve (/Users/.../react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33)
at /Users/.../react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26
at Array.reduce (<anonymous>)
at resolveDependencies (/Users/.../react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33)
at processModule (/Users/.../react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:140:31)
at async addDependency (/Users/.../react-native/node_modules/metro/src/DeltaBundler/traverseDependencies.js:230:18)
at async Promise.all (index 0)
metro 에 남아있는 cache 때문에 발생한 에러
metro cache 삭제로 해결
react-native start --reset-cache
728x90
반응형