9,686 questions
0
votes
0
answers
74
views
React Native NativeWind (Frameless) Versions Compatibility Problem
I'm new to React Native and trying to create an app using tailwind classes but getting different types of error while building the application.
The errors are as follows:
The development server ...
0
votes
2
answers
75
views
`core-js` with `@babel/preset-env` adds unnecessary polyfills and bloats bundle
I’m working on a web project built from an enterprise scaffold using webpack v5 and Babel. The target environment is Chrome ≥ 138 only.
However, I’ve noticed that the build includes unnecessary ...
0
votes
0
answers
40
views
Importing @babel/traverse breaks files
As the title says.
This code reproduces the issue.
My environment: Windows 11, ArchWSL, Volta, [email protected], [email protected]
import fs from "node:fs";
import { Buffer } from "node:buffer&...
1
vote
0
answers
313
views
ESLint 9 with Vue 3 + TypeScript: Parsing error ‘Unexpected token <’
I'm working with Vue3 + Typescript and want to integrate a pipeline with Lint but it's giving me some issues.
I have eslint 9.34.0 and my eslint.config.cjs is in /config but I reference it in my ...
0
votes
1
answer
191
views
'Metro error: __requireContext is not defined' when using babel-plugin-require-context-hook with expo
I was trying to use babel-plugin-require-context-hook to make jest to digest require.context()
, and, as a result of that, my tests finally started running smoothly.
At the same time though, my expo ...
0
votes
0
answers
85
views
Object(...) is not a function due to isPlainObject() in Slate
I'm currently using the Slate text editor within my project. However, I'm running into the following error: TypeError: Object(...) is not a function
The line causing this error within the Slate ...
-1
votes
1
answer
62
views
How to replicate Babel animation in reactjs
hey so im trying to replicate this codepen effect they are using babel and my page is in react and tailwind and i tried a lot of thing but couldn't replicate the effect ps- i have installed Gsap too. ...
1
vote
0
answers
123
views
Expo build gives white screen
I everything runs and compiles on dev mode and hooks work perfectly as well but after eas build is made from expo the shows blank screen.
The apk was generated with no build errors, I tried github ...
0
votes
0
answers
45
views
What could be the reason for the error babel?
build babel C:\Users\redre\OneDrive\Desktop\link-shortening-backend\node_modules\@ampproject\remapping\dist\types\build-source-map-tree.d.ts?
Gives the following error
SyntaxError: C:\Users\redre\...
0
votes
0
answers
86
views
Expo: Unable to resolve <custom path> when NODE_ENV=production
I'm trying to build my Expo application in local (using fastlane 2.227.1) for production but it's failing : the metro bundler seems to not find the custom paths I made.
Unable to resolve module @/src/...
1
vote
1
answer
1k
views
Why am I getting "_traverse.visitors.environmentVisitor is not a function" Error in React Native Expo Development build
I have updated my React Native project to 0.76.9 and Expo to 52.0.46. Since I did this I can do production builds but my development builds have this error when I attempt to run them:
ERROR ...
0
votes
0
answers
256
views
Error while building React app with ApexCharts: Module parse failed in apexcharts.esm.js
I'm working on a React project, and when trying to create a production build with react-scripts build, I get the following error:
javascript
Copy
Edit
Creating an optimized production build...
Failed ...
-1
votes
1
answer
77
views
Copied a PHP project with a node_modules folder in it, new project does not seem to find libraries correctly
I have a PHP project where I used npm to install babel to compile .jsx files. I copied the project by manually cloning the parent project folder. Now when I try to run a babel command like:
$ /...
0
votes
0
answers
58
views
Why am I getting "Object.defineProperty(exports, "File", {"
Recently I used Shadcn on Next.js project.
I am not node on the latest version of node. I am currently on v20.6.0 however when you install Shadcn components I get if you are some past versions of code....
0
votes
1
answer
106
views
Getting Cannot use import statement outside a module when running test in jest
I am trying to run the following test in jest:
import request from "supertest";
import app from '../../src/app';
import QuestionService from "../../src/api/services/questionService"...
-1
votes
1
answer
583
views
How to Add Tailwind CSS / Nativewind CSS in a React Native App Created with Expo?
I recently created a React Native app using the command:
npx create-expo-app@latest
After the project was generated, I noticed the folder structure like this:
Folder Structure Image
My main question ...
1
vote
1
answer
764
views
Better Auth CLI: Cannot find module @babel/core
I've been setting up Better Auth in my Next.js project for quite a while now, and I can't seem to make the Better Auth CLI to work which is
npx @better-auth/cli generate and npx @better-auth/cli@...
0
votes
1
answer
145
views
Bable ignores config file and fails in react-native npx react-native run-ios
I am getting this error when I run the "npx react-native run-ios" :
node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@...
0
votes
1
answer
204
views
Expo Vector icons not showing in react native
Like the title says, my icons are not showing up in my react native project.
Here is my babel config file
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-...
0
votes
1
answer
154
views
Babel isn't transforming imports to require for Jest tests [closed]
I have seen this question a lot on GitHub and Stack Overflow, but using all of the answers that I found, none of them have worked. Everything seems to be set up correctly. I have a monorepo that has a ...
0
votes
0
answers
746
views
How to setup Vitest with React Native / Expo? Getting: RollupError: Parse failure: Expected 'from', got 'typeof'
I can run my Vitest usually, but when I try to import a react native link, it breaks with the error below:
RollupError: Parse failure: Expected 'from', got 'typeof'
At file: /mobile-app/node_modules/...
1
vote
0
answers
72
views
SyntaxError: C:\zero\node_modules\react-native\Libraries\Components\Touchable\TouchableOpacity.js: Missing initializer in const declaration
I'm trying to write tests for my React Native app (using TypeScript). All my unit tests pass without issues, but when writing component tests, I encounter the following error:
● ButtonComponent › ...
0
votes
1
answer
52
views
error in adding nativewind in expo project
Android Bundling failed 544ms node_modules/expo-router/entry.js (1 module)
ERROR node_modules/expo-router/entry.js: [BABEL] /Users/gagandeepsingh/Desktop/Native/jobhunt/node_modules/expo-router/entry....
0
votes
1
answer
287
views
Expo: Importing 'use dom' component from npm package
I'm trying out Expo's new DOM components, which I love so far. However, I now wanted to test keeping a few DOM components in a npm package which I import to my Expo app.
Setup
The npm package
For ...
8
votes
1
answer
3k
views
SyntaxError: Missing initializer in const declaration in React Native (ActivityIndicator.js)
I am encountering the following error when running my React Native project:
SyntaxError: D:\Reacting\node_modules\react-native\Libraries\Components\ActivityIndicator\ActivityIndicator.js: Missing ...
0
votes
1
answer
237
views
Uncaught TypeError: Cannot read properties of undefined (reading 'jsx') when @babel/preset-react automatic
I am unable to render any React component in my @wordpress/scripts project. I do not understand what babel isn't working since it is automatic with @wordpress/scripts. Below is my code
Uncaught ...
11
votes
8
answers
4k
views
How do I fix a MODULE_NOT_FOUND error for a module that I don't manually import?
I was just trying to install a shadcn package and was met with this extremely strange error:
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command "cache" not found
node:internal/modules/cjs/loader:...
0
votes
1
answer
367
views
babel.config.js not initially being created when running expo but crashes when manually created
When I run npx create-expo-app@latest ./ the babel.config.js file is not being created and since I want to be running nativewind I would need to modify the babel.config.js file. First I run npx expo ...
0
votes
1
answer
2k
views
Babel Error: .plugins is not a valid Plugin property When Upgrading to Expo SDK 52
I'm attempting to upgrade my Expo project to SDK version 52, but I'm encountering a persistent Babel error that I can't resolve. Below are the details of my setup, configurations, and the specific ...
0
votes
1
answer
93
views
Module not found: Error while trying to build application
I am upgrading my application dependencies and I am stuck on the below error when I am trying to build my react application (npm run build):
Failed to compile.
Module not found: Error: You attempted ...
1
vote
0
answers
73
views
Parcel cannot find @babel-core, but it is present in node_modules, package.json
The error I receive is as follows:
@parcel/package-manager: Could not find module "@babel/core", but it was listed in package.json. Run your package manager first.
I installed via:
npm ...
0
votes
1
answer
2k
views
Why babel.config.js is not created when creating a project on Expo?
Please tell me why when creating a project (npx create-expo-app@latest --template, blank) does not create a file babel.config.js? So in the terminal there are warnings that I could not find (all on ...
1
vote
0
answers
353
views
expo-linear-gradient throws "Property 'React' doesn't exist" error
After I updated from [email protected] to [email protected] the expo-linear-gradient library started throwing Render Error: Property 'React' doesn't exist and ReferenceError: Property 'React' doesn't exist.
This ...
1
vote
1
answer
677
views
"You may need an additional loader to handle the result of these loaders" - issues with babel config potentially
Currently working with @mui/x-charts and keep getting the same error no matter what I try. I was trying to work with Chart.js and was getting errors to.
./node_modules/@mui/base/Popper/Popper.js 151:...
0
votes
0
answers
171
views
How to "run code through Rollup first, then pass it to Babel"?
To quote the top of the readme for @rollup/plugin-babel:
If you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options:
run the code ...
1
vote
0
answers
71
views
How to transpile #private to _public?
For backwards compatibility purposes I want to transpile my JavaScript private properties to public properties, both fields and methods. Babel does it, but the accurate way, as WeakMap. I see no ...
2
votes
0
answers
77
views
React native babelruntime Error Unable to resolve module @babel/runtime/helpers/interopRequireDefault
I have been dealing with this error for a few days but I couldn't solve it. can you help please? I tried multiple times but it didn't work. He looked at many examples but it doesn't work.
Hello, I ...
1
vote
0
answers
452
views
Unable to resolve module @babel/runtime/helpers/interopRequireDefault could not be found within the project or in these directories: node_modules
I have created a new project with React Native version 0.75.4. I have recently done React native setup so all the dependencies are up to date.
I have created project using: npx @react-native-community/...
0
votes
1
answer
90
views
How are images for a React application managed in production?
Am following a React tutorial which has some images in the src/assets folder and imports them by giving a relative path to component files. I'm a bit confused how this is handled for production.
I ...
1
vote
0
answers
99
views
How do I fix this IOS bundling failure? Unable to resolve "@babel/runtime/helpers/interopRequireDefault" from "node_modules\expo\AppEntry.js"
(https://i.sstatic.net/4P97j1Lj.png)
What can I do? I've tried to delete and reinstall node_packages. Here's my package.json:
{
"name": "optimeal",
"main": "App....
2
votes
2
answers
344
views
Error in build file (babel-node): ReferenceError: require is not defined in ES module scope, you can use import instead
EDIT: Minimal Reproducible Code attached below
I am able to successfully build an old codebase of ours but when running the code using node ui/dist/server, I am getting an error:
ReferenceError: ...
1
vote
0
answers
132
views
Who can explain this weird inference in TypeScript?
I'm sure this is the expected behaviour but it looks counter-intuitive for me. Given the following snippet, why is item inferred as { a: number } instead of { b: number }? I was expecting a kind of ...
0
votes
1
answer
174
views
Import statement error for running test in react
I am getting the import statement error while trying to run the test for my react-app. This is happening after installing JEST.
For you reference I am sharing the error below
● Test suite failed to ...
1
vote
0
answers
614
views
How to read SVG asset using react-native-svg-transformer with Expo
I tried to install react-native-svg-transformer into my Expo project, so I can
load PNG and other image files from assets,
transform SVG files,
use @/src/... as alias.
When I start the project, I ...
1
vote
1
answer
220
views
How do I transpile Angular 17 ES6 app to ES5 for Android 10 devices
Working on a web app for a specialized device that runs Android 10 (Webview uses Chromium <80). When I try to serve the app and test on the Android device, I get errors for using optional chaining ...
-2
votes
1
answer
152
views
jest not able to understand "export default" in a specific file
I have package called sinon js installed to my react app, I have version 5.0.10 of it which is deprecated.
So I decided to upgrade it to latest version which is 18.0.0
This package is used in my test ...
0
votes
2
answers
2k
views
Facing issue while migrating Jest@26 to Jest@27
I'm trying to migrate Jest from version 26 to 27 in my Next.js 13 project but facing the following error while running test after updating to Jest 27 version -
FAIL src/__tests__/app.test.tsx
● ...
0
votes
1
answer
127
views
Setting Up Webpack for a React Project
Setting Up Webpack for a React Project - Need Help with Error
I'm in the process of setting up Webpack for my React project using npm, but I'm encountering an error that I can't seem to resolve. I ...
1
vote
0
answers
56
views
ProvidePlugin Object method polyfill issue
I have webpack + babel setup.
module: {
rules: [
{
test: /\.(js|jsx)?$/,
use: {
loader: 'babel-loader',
options: babelOptions
}
}
]
}
And also, I am ...
1
vote
0
answers
282
views
I'm getting an error when running tests with jest and remix
I'm getting an error when running tests with jest and remix
I'm trying to set up a project using remix and I took the test I saw in the doc as an example to test in the project and I'm getting an ...