【发布时间】:2021-08-14 11:24:22
【问题描述】:
如果有人知道怎么做,请帮我解决这个错误:
Failed building JavaScript bundle.
Unable to resolve module ../Components/View/ReactNativeViewViewConfig from C:\YandexDisk\бизнес\Python\acer_17_inch\tests_react_native\node_modules\react-native\Libraries\Image\ImageViewViewConfig.js:
None of these files exist:
* node_modules\react-native\Libraries\Components\View\ReactNativeViewViewConfig(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
* node_modules\react-native\Libraries\Components\View\ReactNativeViewViewConfig\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)
11 | 'use strict';
12 |
> 13 | import ReactNativeViewViewConfig from '../Components/View/ReactNativeViewViewConfig';
| ^
14 | import type {ReactNativeBaseComponentViewConfig} from '../Renderer/shims/ReactNativeTypes';
15 |
16 | const ImageViewViewConfig = {
【问题讨论】:
-
你的
import语句所在的文件路径是什么? -
不是我的导入导致错误。模块“node_modules”导致错误
-
添加代码,即引发错误的代码。仅通过查看错误日志很难解决问题。但从它的外观来看,import 语句正在引发错误。