Я могу запустить свой визит обычно, но когда я пытаюсь импортировать нативную ссылку 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
Форум по Javascript
1739403700
Anonymous
Я могу запустить свой визит обычно, но когда я пытаюсь импортировать нативную ссылку 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'],
};
};
Подробнее здесь: [url]https://stackoverflow.com/questions/79434739/how-to-setup-vitest-with-react-native-expo-getting-rolluperror-parse-failur[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия