imnapo / react-native-cn-quill

Quill rich-text editor for react-native
MIT License
187 stars 74 forks source link

Problem Module not found: Can't resolve '../assets/icons/align-center.png' in 'C:\node_modules\react-native-cn-quill\lib\src\constants' #48

Closed hayaAbdulaziz closed 3 years ago

hayaAbdulaziz commented 3 years ago

how i can solove C:/Users/Dell/app/node_modules/react-native-cn-quill/lib/src/constants/icons.js Module not found: Can't resolve '../assets/icons/align-center.png' in 'C:\Users\Dell\app\node_modules\react-native-cn-quill\lib\src\constants'

imnapo commented 3 years ago

@hayaAbdulaziz could you please provide more details like your environment. As this files are included in the package, there shouldn't be any problem.

hayaAbdulaziz commented 3 years ago

@hayaAbdulaziz could you please provide more details like your environment. As this files are included in the package, there shouldn't be any problem.

"main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@expo-google-fonts/inter": "^0.1.0", "@expo/webpack-config": "^0.12.77", "@react-native-picker/picker": "^1.16.1", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "expo": "~41.0.1", "expo-app-loading": "^1.1.2", "expo-linear-gradient": "^9.1.0", "expo-status-bar": "~1.0.4", "expo-video-thumbnails": "^5.1.0", "react": "16.13.1", "react-dom": "16.13.1", "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz", "react-native-cn-richtext-editor": "^1.0.43", "react-native-dropdown-picker": "^5.1.21", "react-native-elements": "^3.4.2", "react-native-gesture-handler": "^1.10.3", "react-native-modal-dropdown": "git+https://github.com/siemiatj/react-native-modal-dropdown.git", "react-native-responsive-dimensions": "^3.1.1", "react-native-responsive-screen": "^1.4.2", "react-native-screens": "^3.4.0", "react-native-selectme": "^1.2.3", "react-native-web": "~0.13.12" }, "devDependencies": { "@babel/core": "^7.14.5" }, "private": true }

Samilei commented 3 years ago

I have the same issue. My Expo project is not in TypeScript, might that be the problem? @imnapo

imnapo commented 3 years ago

I've tried to reproduce this error but it worked as expected, both on iPhone and android devices in typescript and JavaScript expo projects.

ChechkovEugene commented 3 years ago

Have possible the same problem on icons resolving (on all icons)

Could not read source map for http://localhost:8081/node_modules/react-native-cn-quill/src/assets/icons/align-center.bundle?platform=ios&modulesOnly=true&app={MyAppName}&dev=true&minify=false&runModule=true&shallow=true: Unexpected 500 response from http://localhost:8081/node_modules/react-native-cn-quill/src/assets/icons/align-center.map?platform=ios&modulesOnly=true&app={MyAppName}&dev=true&minify=false&runModule=true&shallow=true: <!DOCTYPE html>

Error
Error: Unable to resolve module 
./node_modules/react-native-cn-quill/src/assets/icons/align-center from 
{Path to my app}.: 

None of these files exist:
 * node_modules/react-native-cn-quill/src/assets/icons/align-center(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
 * node_modules/react-native-cn-quill/src/assets/icons/align-center/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
   at ModuleResolver.resolveDependency ({Path to my app}/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15)
   at DependencyGraph.resolveDependency ({Path to my app}node_modules/metro/src/node-haste/DependencyGraph.js:288:43)
   at {Path to my app}/node_modules/metro/src/lib/transformHelpers.js:129:24
   at Server._resolveRelativePath ({Path to my app}/node_modules/metro/src/Server.js:1072:12)
   at async Server.requestProcessor [as _processSourceMapRequest] ({Path to my app}/node_modules/metro/src/Server.js:428:37)
   at async Server._processRequest ({Path to my app}/node_modules/metro/src/Server.js:389:7)
imnapo commented 3 years ago

@hayaAbdulaziz , @ChechkovEugene and @Samilei , I removed image files and replaced it with base64 strings in the new update to fix this issue. Let me now if it's working now.

imnapo commented 3 years ago

I'm closing this issue now, Feel free to reopen if the problem still exists.