Module Not Found
sjhsieh opened this issue · 0 comments
Hi, I'm getting Module not found error from webpack for react-device-detect
I've npm installed it, and I used
import {isMobile} from 'react-device-detect'; to import it, and. I get this error message:
web_1 | ERROR in ./src/components/mobileInfo/mobileInfo.js 3:0-83
web_1 | Module not found: Error: Can't resolve 'react-device-detect' in '/app/src/components/mobileInfo'
web_1 | resolve 'react-device-detect' in '/app/src/components/mobileInfo'
web_1 | Parsed request is a module
web_1 | using description file: /app/package.json (relative path: ./src/components/mobileInfo)
web_1 | resolve as module
web_1 | /app/src/components/mobileInfo/node_modules doesn't exist or is not a directory
web_1 | /app/src/components/node_modules doesn't exist or is not a directory
web_1 | /app/src/node_modules doesn't exist or is not a directory
web_1 | looking for modules in /app/node_modules
web_1 | single file module
web_1 | using description file: /app/package.json (relative path: ./node_modules/react-device-detect)
web_1 | no extension
web_1 | /app/node_modules/react-device-detect doesn't exist
web_1 | .ts
web_1 | /app/node_modules/react-device-detect.ts doesn't exist
web_1 | .tsx
web_1 | /app/node_modules/react-device-detect.tsx doesn't exist
web_1 | *
web_1 | /app/node_modules/react-device-detect* doesn't exist
web_1 | .js
web_1 | /app/node_modules/react-device-detect.js doesn't exist
web_1 | .jsx
web_1 | /app/node_modules/react-device-detect.jsx doesn't exist
web_1 | .json
web_1 | /app/node_modules/react-device-detect.json doesn't exist
web_1 | .wasm
web_1 | /app/node_modules/react-device-detect.wasm doesn't exist
web_1 | /app/node_modules/react-device-detect doesn't exist
web_1 | /node_modules doesn't exist or is not a directory
web_1 | @ ./src/components/app.js 37:0-49 71:38-48
web_1 | @ ./src/index.js 11:0-35 33:36-39