Я могу запустить свой визит обычно, но когда я пытаюсь импортировать нативную ссылку React, она ломается с ошибкой ниже: < /p>
RollupError: Parse failure: Expected 'from', got 'typeof'
At file: /mobile-app/node_modules/react-native/index.js:15:8
File: /mobile-app/node_modules/react-native/index.js:15:8
13 |
14 | // APIs
15 | import typeof ActionSheetIOS from "/node_modules/react-native/Libraries/ActionSheetIOS/ActionSheetIOS.js";
| ^
16 | import typeof Alert from "/node_modules/react-native/Libraries/Alert/Alert.js";
17 | import typeof Animated from "/node_modules/react-native/Libraries/Animated/Animated.js";
< /code>
/// my test
import { describe, test, expect, it } from 'vitest';
import { isSolanaAddress } from '@/helpers/formatters';
import * as Linking from 'expo-linking';
describe('deep-link-redirection', () => {
test('deep-link', () => {
const { hostname, path, queryParams } = Linking.parse('scheme://path');
console.log(hostname, path, queryParams);
});
});
< /code>
// vite.config.mts
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
plugins: [tsconfigPaths()],
});
< /code>
// babel.config.js
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
Подробнее здесь: https://stackoverflow.com/questions/794 ... rse-failur
Как настроить Vitest с помощью React Native / Expo? Получение: Rolluperror: Parse отказ: ожидается 'от', at 'typeof' ⇐ Javascript
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Vitest, дающий TypeError: React.Act не является функцией с React Version 19.
Anonymous » » в форуме Javascript - 0 Ответы
- 6 Просмотры
-
Последнее сообщение Anonymous
-
-
-
RollupError: «default» не экспортируется «node_modules/react/index.js»
Гость » » в форуме Javascript - 0 Ответы
- 20 Просмотры
-
Последнее сообщение Гость
-
-
-
RollupError: «default» не экспортируется «node_modules/react/index.js»
Anonymous » » в форуме Javascript - 0 Ответы
- 15 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Сообщение об ошибке регистрируется как элемент React $$typeof: Symbol(react.element)
Anonymous » » в форуме Javascript - 0 Ответы
- 29 Просмотры
-
Последнее сообщение Anonymous
-