namjh654 / mnu_busproject_app

project :
0 stars 1 forks source link

[error] error: Error: Unable to resolve module `querystring` from `node_modules\body-parser\lib\types\urlencoded.js`: querystring could not be found within the project. #14

Open namjh654 opened 3 years ago

namjh654 commented 3 years ago

error: Error: Unable to resolve module querystring from node_modules\body-parser\lib\types\urlencoded.js: querystring could not be found within the project.

error: Error: Unable to resolve module querystring from node_modules\body-parser\lib\types\urlencoded.js: querystring could not be found within the project.

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules: rm -rf node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-* at ModuleResolver.resolveDependency (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:186:15) at ResolutionRequest.resolveDependency (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\node-haste\DependencyGraph.js:287:16) at Object.resolve (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\lib\transformHelpers.js:267:42) at C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\DeltaBundler\traverseDependencies.js:434:31 at Array.map () at resolveDependencies (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\DeltaBundler\traverseDependencies.js:431:18) at C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\DeltaBundler\traverseDependencies.js:275:33 at Generator.next () at asyncGeneratorStep (C:\Users\nam\mnu_busproject_app\client\node_modules\metro\src\DeltaBundler\traverseDependencies.js:87:24)
namjh654 commented 3 years ago

[solved]

node_module 삭제 후 npm i

  1. npm i express
  2. npm i body-parser
  3. npm i querystring
  4. npm i zlib
  5. npm i path