我在安装 Ready 系统时遇到此错误 当我开始 Expo 时出现 React Native 错误
“” 纱线安装 纱线安装 v1.22.18 警告 ....\package.json:没有许可证字段 [1/4] 正在解析包... [2/4] 正在获取包裹... [3/4] 链接依赖项... 警告“> [电子邮件受保护]”未满足对等依赖性“lottie-ios@^3.2.3”。 警告“react-native > react-native-codegen > [email protected]”未满足对等依赖关系“@babel/preset-env@^7.1.6”。 [4/4] 构建新鲜包...
success Saved lockfile.
Done in 37.42s.
C:\Users\isimsiz\Desktop\V1.0.0>yarn global add expo-cli
yarn global v1.22.18
warning ..\..\package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "xo > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- expo
- expo-cli
Done in 19.80s.
yarn global v1.22.18ktop\V1.0.0>yarn global add eas-cli
warning ..\..\package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "xo > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
- eas
Done in 17.36s.
“”
世博会开始:( Eroor
Using node to generate images. This is much slower than using native packages.
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
Using node to generate images. This is much slower than using native packages.
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
Using node to generate images. This is much slower than using native packages.
› Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
Web Bundling complete 105940ms
./node_modules/react-native/Libraries/Components/TextInput/TextInputState.js:18:17
Module not found: Can't resolve '../../Utilities/Platform'
16 |
17 | const React = require('react');
> 18 | const Platform = require('../../Utilities/Platform');
| ^
19 | const {findNodeHandle} = require('../../Renderer/shims/ReactNative');
20 | import {Commands as AndroidTextInputCommands} from '../../Components/TextInput/AndroidTextInputNativeComponent';
21 | import {Commands as iOSTextInputCommands} from '../../Components/TextInput/RCTSingelineTextInputNativeComponent';
./node_modules/react-native/Libraries/Core/Timers/JSTimers.js:14:17
Module not found: Can't resolve '../../Utilities/Platform'
12 |
13 | const BatchedBridge = require('../../BatchedBridge/BatchedBridge');
> 14 | const Platform = require('../../Utilities/Platform');
| ^
15 | const Systrace = require('../../Performance/Systrace');
16 |
17 | const invariant = require('invariant');
./node_modules/@stripe/stripe-react-native/lib/module/components/StripeProvider.js:1:515
Module not found: Can't resolve '../../package.json'
> 1 | var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StripeProvider=StripeProvider;exports.initStripe=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=require("react");var _NativeStripeSdk=_interopRequireDefault(require("../NativeStripeSdk"));var _helpers=require("../helpers");var _package=_interopRequireDefault(require("../../package.json"));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});}keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var EXPO_PARTNER_ID='pp_partner_JBN7LkABco2yUu';var repository=_package.default.repository;var appInfo={name:(0,_helpers.shouldAttributeExpo)()?_package.default.name+"/expo":_package.default.name,url:repository.url||repository,version:_package.default.version,partnerId:(0,_helpers.shouldAttributeExpo)()?EXPO_PARTNER_ID:undefined};var initStripe=function initStripe(params){var extendedParams;return _regenerator.default.async(function initStripe$(_context){while(1){switch(_context.prev=_context.next){case 0:extendedParams=_objectSpread(_objectSpread({},params),{},{appInfo:appInfo});_NativeStripeSdk.default.initialise(extendedParams);case 2:case"end":return _context.stop();}}},null,null,null,Promise);};exports.initStripe=initStripe;function StripeProvider(_ref){var children=_ref.children,publishableKey=_ref.publishableKey,merchantIdentifier=_ref.merchantIdentifier,threeDSecureParams=_ref.threeDSecureParams,stripeAccountId=_ref.stripeAccountId,urlScheme=_ref.urlScheme,setUrlSchemeOnAndroid=_ref.setUrlSchemeOnAndroid;(0,_react.useEffect)(function(){if(!publishableKey){return;}if(_helpers.isAndroid){_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,urlScheme:urlScheme,setUrlSchemeOnAndroid:setUrlSchemeOnAndroid});}else{_NativeStripeSdk.default.initialise({publishableKey:publishableKey,appInfo:appInfo,stripeAccountId:stripeAccountId,threeDSecureParams:threeDSecureParams,merchantIdentifier:merchantIdentifier,urlScheme:urlScheme});}},[publishableKey,merchantIdentifier,stripeAccountId,threeDSecureParams,urlScheme,setUrlSchemeOnAndroid]);return children;}
| ^
2 | //# sourceMappingURL=StripeProvider.js.map
./node_modules/react-native/Libraries/Alert/Alert.js:13
Module not found: Can't resolve '../Utilities/Platform'
11 | 'use strict';
12 |
> 13 | import Platform from '../Utilities/Platform';
14 | import NativeDialogManagerAndroid, {
15 | type DialogOptions,
16 | } from '../NativeModules/specs/NativeDialogManagerAndroid';
./node_modules/react-native/Libraries/Core/NativeExceptionsManager.js:60:17
Module not found: Can't resolve '../Utilities/Platform'
58 | }
59 |
> 60 | const Platform = require('../Utilities/Platform');
| ^
61 |
62 | const NativeModule = TurboModuleRegistry.getEnforcing<Spec>(
63 | 'ExceptionsManager',
./node_modules/react-native/Libraries/Core/setUpDeveloperTools.js:13
Module not found: Can't resolve '../Utilities/Platform'
11 | 'use strict';
12 |
> 13 | import Platform from '../Utilities/Platform';
14 |
15 | declare var console: typeof console & {_isPolyfilled: boolean, ...};
16 |
./node_modules/react-native/Libraries/Core/ReactNativeVersionCheck.js:13
Module not found: Can't resolve '../Utilities/Platform'
11 | 'use strict';
12 |
> 13 | import Platform from '../Utilities/Platform';
14 | const ReactNativeVersion = require('./ReactNativeVersion');
15 |
16 | /**
./node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:13
Module not found: Can't resolve '../Utilities/Platform'
11 | 'use strict';
12 |
> 13 | import Platform from '../Utilities/Platform';
14 | import EventEmitter from '../vendor/emitter/EventEmitter';
15 | import {type EventSubscription} from '../vendor/emitter/EventEmitter';
16 | import RCTDeviceEventEmitter from './RCTDeviceEventEmitter';
./node_modules/react-native/Libraries/Image/AssetSourceResolver.js:24:17
Module not found: Can't resolve '../Utilities/Platform'
22 |
23 | const PixelRatio = require('../Utilities/PixelRatio');
> 24 | const Platform = require('../Utilities/Platform');
| ^
25 |
26 | const invariant = require('invariant');
27 |
./node_modules/react-native/Libraries/ReactNative/PaperUIManager.js:14:17
Module not found: Can't resolve '../Utilities/Platform'
12 |
13 | const NativeModules = require('../BatchedBridge/NativeModules');
> 14 | const Platform = require('../Utilities/Platform');
| ^
15 | const UIManagerProperties = require('./UIManagerProperties');
16 |
17 | const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty');
./node_modules/react-native/Libraries/ReactPrivate/ReactNativePrivateInterface.js:32:11
Module not found: Can't resolve '../Utilities/Platform'
30 | },
31 | get Platform(): Platform {
> 32 | return require('../Utilities/Platform');
| ^
33 | },
34 | get RCTEventEmitter(): RCTEventEmitter {
35 | return require('../EventEmitter/RCTEventEmitter');
./node_modules/react-native/Libraries/StyleSheet/processColor.js:13:17
Module not found: Can't resolve '../Utilities/Platform'
11 | 'use strict';
12 |
> 13 | const Platform = require('../Utilities/Platform');
| ^
14 |
15 | const normalizeColor = require('./normalizeColor');
16 |
./node_modules/react-native/Libraries/StyleSheet/processTransform.js:14:17
Module not found: Can't resolve '../Utilities/Platform'
12 |
13 | const MatrixMath = require('../Utilities/MatrixMath');
> 14 | const Platform = require('../Utilities/Platform');
| ^
15 |
16 | const invariant = require('invariant');
17 | const stringifySafe = require('../Utilities/stringifySafe').default;
./node_modules/react-native/Libraries/Utilities/HMRClient.js:16:17
Module not found: Can't resolve './Platform'
14 | const invariant = require('invariant');
15 | const MetroHMRClient = require('metro-runtime/src/modules/HMRClient');
> 16 | const Platform = require('./Platform');
| ^
17 | const prettyFormat = require('pretty-format');
18 |
19 | import getDevServer from '../Core/Devtools/getDevServer';
./node_modules/react-native/Libraries/StyleSheet/processColor.js:34:31
Module not found: Can't resolve './PlatformColorValueTypes'
32 |
33 | if (typeof normalizedColor === 'object') {
> 34 | const processColorObject = require('./PlatformColorValueTypes')
| ^
35 | .processColorObject;
36 |
37 | const processedColorObj = processColorObject(normalizedColor);
./node_modules/react-native/Libraries/StyleSheet/normalizeColor.js:24:35
Module not found: Can't resolve './PlatformColorValueTypes'
22 | ): ?ProcessedColorValue {
23 | if (typeof color === 'object' && color != null) {
> 24 | const {normalizeColorObject} = require('./PlatformColorValueTypes');
| ^
25 | const normalizedColor = normalizeColorObject(color);
26 | if (normalizedColor != null) {
27 | return color;
./node_modules/react-native/Libraries/Alert/Alert.js:17
Module not found: Can't resolve './RCTAlertManager'
15 | type DialogOptions,
16 | } from '../NativeModules/specs/NativeDialogManagerAndroid';
> 17 | import RCTAlertManager from './RCTAlertManager';
18 |
19 | export type AlertType =
20 | | 'default'
./node_modules/react-native/Libraries/Network/XMLHttpRequest.js:18:22
Module not found: Can't resolve './RCTNetworking'
16 | const EventTarget = require('event-target-shim');
17 | const GlobalPerformanceLogger = require('../Utilities/GlobalPerformanceLogger');
> 18 | const RCTNetworking = require('./RCTNetworking');
| ^
19 |
20 | const base64 = require('base64-js');
21 | const invariant = require('invariant');
./components/AdmobBanner.jsx:6
Module not found: Can't resolve 'expo-ads-admob'
4 | import { useStateValue } from "../StateProvider";
5 |
> 6 | import {
7 | AdMobBanner,
8 | setTestDeviceIDAsync,
9 | requestPermissionsAsync,
./screens/HomeScreen.jsx:3
Module not found: Can't resolve 'expo-ads-admob'
1 | /* eslint-disable no-unused-vars */
2 | /* eslint-disable no-undef */
> 3 | import { requestPermissionsAsync, getPermissionsAsync } from "expo-ads-admob";
4 | import React, { useState, useEffect, useCallback, useRef } from "react";
5 | import {
6 | View,
./node_modules/@react-navigation/drawer/lib/module/views/DrawerView.js:22
Module not found: Can't resolve 'react-native-reanimated'
20 | View,
21 | } from 'react-native';
> 22 | import * as Reanimated from 'react-native-reanimated';
23 | import { useSafeAreaFrame } from 'react-native-safe-area-context';
24 |
25 | import type {
./node_modules/@react-navigation/drawer/lib/module/views/legacy/Drawer.js:12
Module not found: Can't resolve 'react-native-reanimated'
10 | View,
11 | } from 'react-native';
> 12 | import Animated from 'react-native-reanimated';
13 |
14 | import type { DrawerProps } from '../../types';
15 | import DrawerProgressContext from '../../utils/DrawerProgressContext';
./node_modules/@react-navigation/drawer/lib/module/views/legacy/Overlay.js:3
Module not found: Can't resolve 'react-native-reanimated'
1 | import * as React from 'react';
2 | import { Platform, Pressable, StyleSheet } from 'react-native';
> 3 | import Animated from 'react-native-reanimated';
4 |
5 | const {
6 | // @ts-expect-error: this is to support reanimated 1
./node_modules/@react-navigation/drawer/lib/module/views/modern/Drawer.js:15
Module not found: Can't resolve 'react-native-reanimated'
13 | State as GestureState,
14 | } from 'react-native-gesture-handler';
> 15 | import Animated, {
16 | interpolate,
17 | runOnJS,
18 | useAnimatedGestureHandler,
./node_modules/@react-navigation/drawer/lib/module/views/modern/Overlay.js:3
Module not found: Can't resolve 'react-native-reanimated'
1 | import * as React from 'react';
2 | import { Platform, Pressable, StyleSheet } from 'react-native';
> 3 | import Animated, {
4 | useAnimatedProps,
5 | useAnimatedStyle,
6 | } from 'react-native-reanimated';
./node_modules/react-native-draggable-flatlist/lib/constants.js:5:32
Module not found: Can't resolve 'react-native-reanimated'
3 | exports.isReanimatedV2 = exports.isWeb = exports.isAndroid = exports.isIOS = exports.DEFAULT_PROPS = exports.DEFAULT_ANIMATION_CONFIG = exports.SCROLL_POSITION_TOLERANCE = void 0;
4 | var react_native_1 = require("react-native");
> 5 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
6 | // Fire onScrollComplete when within this many px of target offset
7 | exports.SCROLL_POSITION_TOLERANCE = 2;
8 | exports.DEFAULT_ANIMATION_CONFIG = {
./node_modules/react-native-draggable-flatlist/lib/procs.js:23:45
Module not found: Can't resolve 'react-native-reanimated'
21 | Object.defineProperty(exports, "__esModule", { value: true });
22 | exports.springFill = exports.setupCell = exports.hardReset = exports.getIsAfterActive = void 0;
> 23 | var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
| ^
24 | var constants_1 = require("./constants");
25 | var set = react_native_reanimated_1.default.set, cond = react_native_reanimated_1.default.cond, add = react_native_reanimated_1.default.add, sub = react_native_reanimated_1.default.sub, block = react_native_reanimated_1.default.block, eq = react_native_reanimated_1.default.eq, neq = react_native_reanimated_1.default.neq, and = react_native_reanimated_1.default.and, divide = react_native_reanimated_1.default.divide, greaterThan = react_native_reanimated_1.default.greaterThan, greaterOrEq = react_native_reanimated_1.default.greaterOrEq, Value = react_native_reanimated_1.default.Value, spring = react_native_reanimated_1.default.spring, lessThan = react_native_reanimated_1.default.lessThan, lessOrEq = react_native_reanimated_1.default.lessOrEq, multiply = react_native_reanimated_1.default.multiply;
26 | if (!react_native_reanimated_1.default.proc) {
./node_modules/react-native-draggable-flatlist/lib/components/DraggableFlatList.js:43:45
Module not found: Can't resolve 'react-native-reanimated'
41 | var react_1 = __importStar(require("react"));
42 | var react_native_gesture_handler_1 = require("react-native-gesture-handler");
> 43 | var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
| ^
44 | var CellRendererComponent_1 = __importDefault(require("./CellRendererComponent"));
45 | var constants_1 = require("../constants");
46 | var PlaceholderItem_1 = __importDefault(require("./PlaceholderItem"));
./node_modules/react-native-draggable-flatlist/lib/components/CellDecorators.js:28:45
Module not found: Can't resolve 'react-native-reanimated'
26 | var react_1 = __importDefault(require("react"));
27 | var react_native_1 = require("react-native");
> 28 | var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
| ^
29 | var draggableFlatListContext_1 = require("../context/draggableFlatListContext");
30 | var useNode_1 = require("../hooks/useNode");
31 | var useOnCellActiveAnimation_1 = require("../hooks/useOnCellActiveAnimation");
./node_modules/react-native-draggable-flatlist/lib/components/ScrollOffsetListener.js:3:32
Module not found: Can't resolve 'react-native-reanimated'
1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
> 3 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
4 | var utils_1 = require("../utils");
5 | var ScrollOffsetListener = function (_a) {
6 | var scrollOffset = _a.scrollOffset, onScrollOffsetChange = _a.onScrollOffsetChange;
./node_modules/react-native-draggable-flatlist/lib/components/PlaceholderItem.js:24:45
Module not found: Can't resolve 'react-native-reanimated'
22 | var react_1 = __importStar(require("react"));
23 | var react_native_1 = require("react-native");
> 24 | var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
| ^
25 | var animatedValueContext_1 = require("../context/animatedValueContext");
26 | var draggableFlatListContext_1 = require("../context/draggableFlatListContext");
27 | var propsContext_1 = require("../context/propsContext");
./node_modules/react-native-draggable-flatlist/lib/components/CellRendererComponent.js:38:45
Module not found: Can't resolve 'react-native-reanimated'
36 | var react_1 = __importStar(require("react"));
37 | var react_native_1 = require("react-native");
> 38 | var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
| ^
39 | var draggableFlatListContext_1 = require("../context/draggableFlatListContext");
40 | var constants_1 = require("../constants");
41 | var useCellTranslate_1 = require("../hooks/useCellTranslate");
./node_modules/react-native-draggable-flatlist/lib/context/animatedValueContext.js:24:32
Module not found: Can't resolve 'react-native-reanimated'
22 | exports.useAnimatedValues = void 0;
23 | var react_1 = __importStar(require("react"));
> 24 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
25 | var react_native_gesture_handler_1 = require("react-native-gesture-handler");
26 | var useNode_1 = require("../hooks/useNode");
27 | var react_2 = require("react");
./node_modules/react-native-draggable-flatlist/lib/hooks/useAutoScroll.js:41:32
Module not found: Can't resolve 'react-native-reanimated'
39 | exports.useAutoScroll = void 0;
40 | var react_1 = require("react");
> 41 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
42 | var react_native_gesture_handler_1 = require("react-native-gesture-handler");
43 | var constants_1 = require("../constants");
44 | var useNode_1 = require("../hooks/useNode");
./node_modules/react-native-draggable-flatlist/lib/hooks/useOnCellActiveAnimation.js:4:32
Module not found: Can't resolve 'react-native-reanimated'
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.useOnCellActiveAnimation = void 0;
> 4 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
5 | var animatedValueContext_1 = require("../context/animatedValueContext");
6 | var cellContext_1 = require("../context/cellContext");
7 | var procs_1 = require("../procs");
./node_modules/react-native-draggable-flatlist/lib/hooks/useSpring.js:16:32
Module not found: Can't resolve 'react-native-reanimated'
14 | exports.useSpring = void 0;
15 | var react_1 = require("react");
> 16 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
17 | var constants_1 = require("../constants");
18 | function useSpring(_a) {
19 | var _b = _a === void 0 ? { config: constants_1.DEFAULT_ANIMATION_CONFIG } : _a, configParam = _b.config;
./node_modules/react-native-draggable-flatlist/lib/hooks/useCellTranslate.js:4:32
Module not found: Can't resolve 'react-native-reanimated'
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.useCellTranslate = void 0;
> 4 | var react_native_reanimated_1 = require("react-native-reanimated");
| ^
5 | var animatedValueContext_1 = require("../context/animatedValueContext");
6 | var refContext_1 = require("../context/refContext");
7 | var procs_1 = require("../procs");
./node_modules/react-native-youtube-iframe/dist/WebView.web.js:1:202
Module not found: Can't resolve 'react-native-web-webview'
> 1 | Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"WebView",{enumerable:true,get:function get(){return _reactNativeWebWebview.WebView;}});var _reactNativeWebWebview=require("react-native-web-webview");
| ^
./node_modules/@openspacelabs/react-native-zoomable-view/src/ReactNativeZoomableView.tsx 39:2
Module parse failed: Unexpected token (39:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders`enter code here`
| originalPageX: null,
| originalPageY: null,
> } as ReactNativeZoomableViewState;
|
| class ReactNativeZoomableView extends Component<
Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys
这似乎是洛蒂发来的。洛蒂(Lottie)给我带来了博览会浏览器应用程序的问题(在移动应用程序上运行良好),因此用一个简单的图像替换了。我认为有一种方法可以让 Lottie 在浏览器上工作,但我懒得弄清楚。
{Platform.OS === 'web' ? (
<Image
source={source}
style={{ width: 200, height: 200, borderRadius: 40/2, alignSelf: 'center' }}
/>
// <Lottie options={lottieOptions} height={200} width={200} />
) : (
<LottieView
autoPlay
ref={animation}
style={{
width: 200,
height: 200,
backgroundColor: '#eee',
alignSelf: 'center',
}}
source={require('../../../../assets/animations/activation_code.json')}
/>
)}