node.js clean cache, AmbiguousModuleResolutionError



As shown in the figure, it

probably means that require('ReactNative') failed, there are multiple people with this name, one of them is in the...\src\... directory, I checked this directory and found the directory doesn't exist at all.

After testing, after deleting this project (zixiaoapp), a brand new project of react-native init zixiaoapp will still report this error, so it is guessed that nodejs has cached the compilation result.


npm start -- --reset-cache

executes the command to clear the cache again. It

seems that there is another command called npm cache clean

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326370424&siteId=291194637