9,771
questions
-3
votes
0
answers
22
views
Tool to determine what lowest version of Browser is compatible? [closed]
Now in my application, whether Vue or Nuxt or others, is there a package or library that checks the (output) files, whether JS or CSS, and tells me the lowest version of browsers compatible with my ...
0
votes
0
answers
26
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
21
views
React-native js bundle including relative paths
when I run command npx react-native bundle which creates me RN .js bundle files, in those files all import references have a relative path which starts ".__location="/Users/...
0
votes
0
answers
62
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 ...
0
votes
0
answers
12
views
Glup/Rollup/babel-preset-minify requires await on rollup.rollup() for multiple files in same function
I want to verify that the statement in the title is true, and see if anyone can provide an explanation and/or a workaround. If I only work with one .js file, it works without the async/await. Adding ...
1
vote
0
answers
43
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 ...
0
votes
0
answers
25
views
Nuxt 3.13.2 Optional chaining support for Firefox v60.8.0esr (64bit)
I have a project that uses Nuxt 3.13.2 and have optional chaining across multiple files. How do I go about transpiling the code so that it can work on older Firefox browsers v60.8.0. I have tried ...
1
vote
0
answers
13
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 ...
-2
votes
0
answers
102
views
I get this error in google chrome console when I try to run the html file [duplicate]
Access to XMLHttpRequest at 'file:///home/h/Documents/personal/self%20study/react/scrimba/Scrim-s0hsaqhfmk/index.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only ...
0
votes
0
answers
17
views
Rollup, babel - Using fs node built-in in a react app with rollup
I love rollup, but this thing has been a show-stopper.
I am not able to access and use fs methods with a simple react app. I can log fs object at rollup level, but it breaks run-time accessing fs.
I ...
-2
votes
0
answers
27
views
ReferenceError: React is not defined (Storybook + TypeScript + React 18 + Babel + Webpack 5) [duplicate]
Does anyone know why I keep getting the following when I load storybook?
enter image description here
I only recently started seeing this once I upgraded the repo to React 18, and removed the imports ...
0
votes
0
answers
69
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
46
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
36
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....
0
votes
0
answers
33
views
Babel won't transpile export statement of my .js file
Let's suppose I have following trying.js file:
import {BaseException} from "../public/libs/pdfjs/build/pdf";
let __webpack_exports__ = globalThis.pdfjsLib = {};
class AbortException ...
0
votes
0
answers
28
views
Webpack issue Uncaught ReferenceError: require is not defined
I'm working on converting my React Native app to support both mobile web and desktop web using react-native-web. I've set up webpack and made necessary changes to my babel.config.js, but I am ...
2
votes
2
answers
146
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: ...
0
votes
0
answers
43
views
Configuring eslint-parser with custom babel plugin so that VS code intellisense works
I am trying to do the following (i am in learning stage):
I made a simple babel plugin which looks for a variable declaration const magic = { ... } and inserts a property as follows: const magic = { ...
0
votes
0
answers
14
views
Babel is NOT working well with the super keyword
I have this package.json:
{
"name": "theme1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"...
0
votes
0
answers
14
views
Remove console logs from CRA in production server
I wanted to remove all the logs in the production server for two main reasons: One is to try reducing the overall bundle size and other is to make the logging clean in the main website(there are ...
1
vote
0
answers
114
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
0
answers
29
views
Issue running tests with Enzyme, React 16, and Emotion 11.x
I am working on a React 16.8.x application and am in the process of updating to emotion 11.13.x. I also use Enzume v3.x and the react 16 adapter for it.
In my typical component I use the css={{}} ...
0
votes
0
answers
61
views
Unable to complete the setup initial for WordPress block plugin
I created my WordPress site using local. There is no plugin installed on the website.
My Node version is 20.17.0 and my NPM version is 10.8.3
My WordPress version is 6.6.2
I execute the following ...
0
votes
1
answer
48
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 ...
0
votes
0
answers
48
views
Getting Warning in Select2 Component Jest Test
I'm working on a Vue application where I've implemented a custom autocomplete dropdown using the Select2 library. The component is functioning correctly in terms of its intended functionality, but I'm ...
0
votes
0
answers
43
views
`import` CSS files are returning null, while `require` works on Electron Forge's ReactJs project using Webpack
I'm building an Electron Forge project with ReactJs:
Here is my configuration:
webpack.rules.js
module.exports = [
// Add support for native node modules
{
// We're specifying ...
0
votes
0
answers
187
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 ...
0
votes
0
answers
36
views
How to uninstall deprecated @babel plugins
I have many @babel plugins in my project that have been deprecated and need replaced. How can I uninstall the deprecated plugins when they don't appear in my package.json?
Example:
deprecated @babel/...
1
vote
1
answer
78
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 ...
0
votes
0
answers
22
views
Using Tailwinds with Parcel and Babel - livereload trouble
Wondering if anyone can please help me understand, I am trying to use tailwinds along with parcel bundler but am having a hard time getting it running nicely and I assume it has to do with the ...
-2
votes
1
answer
74
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
0
answers
145
views
You may need an additional loader to handle the result of these loaders - @antv
I am usign Line Chart from import { Line } from '@ant-design/plots';
Since yesterday My build is getting failed with this error:
Failed to compile.
./node_modules/@antv/g2/node_modules/@antv/component/...
0
votes
2
answers
1k
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
61
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
47
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 ...
0
votes
0
answers
38
views
property 'exports' doesn't exists in react-native-lottie-splash-screen
I have installed react-native-lottie-splash screen library, splash screen is loaded but when I am calling hide function I am getting this error
Note: I am using re-pack.
here is the output of react-...
1
vote
0
answers
93
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 ...
1
vote
0
answers
116
views
Production Build/run in Expo causes layout to break
I'm using Tamagui and Expo to develop a web/android/ios application. Running the application with npx expo start (whether through the emulator, expo go, or dev server), everything goes perfectly, and ...
1
vote
1
answer
1k
views
Requires Babel "^7.16.0", but was loaded with "7.9.0"
Error: [BABEL] unknown: Requires Babel "^7.16.0", but was loaded with "7.9.0". If you are sure you have a compatible version of @babel/core, it is likely that something in your ...
1
vote
0
answers
37
views
How do I fix TypeError: player.update is not a function error?
Image of Error
I'm trying to use a player method from my player.js file which is defined as follows:
// src/player.js
class Player {
constructor(name, x, y, radius, color) {
this.name = ...
1
vote
0
answers
73
views
TypeScript 5.5.4: tsc --extendedDiagnostics not showing JavaScript and TypeScript code lines
I have a problem with TypeScript 5.5.4. When running tsc --extendedDiagnostics, the output no longer shows the lines of JavaScript and TypeScript code. I have checked my tsconfig.json file and cannot ...
0
votes
1
answer
35
views
How to Use Preact Signals in a CRA Project
I've a Create React App project and I'm trying to use useSignal as per this docs, but the values of signals are not rendering. (Like x.value does not render).
I've run:
npm i @preact/signals-react
npm ...
0
votes
0
answers
235
views
react native expo metro-blunder
It happens that when I do npx expo start I get these warnings and errors, this did not happen to me yesterday, it started happening from today without having touched any code.
So far I haven't found ...
0
votes
0
answers
164
views
You appear to be using a native ECMAScript module configuration file
I am doing a location-based react native app and i wanted to enable locations of users. But suddenly i receive an error about babel config file here the error: app\screens\EnableLocation.jsx: You ...
0
votes
1
answer
48
views
Rollup and babel does not transpile cssprop to styled component
I'm developing a React component library for npm. The tech stack includes:
React
TypeScript
styled-components
I'm using Babel and Rollup for the build process.
My issue is that I want to use the css ...
-2
votes
1
answer
42
views
React library debugging and conribution. Debug Reactjs. Source code
I followed Development Workflow steps to start my research in React library.
However, I got stuck on last step with build command
yarn build react/index,react-dom/index --type=UMD
When I run this line ...
1
vote
0
answers
27
views
Error after upgrading a deprecated babel plugin
After upgrading from @babel/plugin-proposal-export-namespace-from to @babel/plugin-transform-export-namespace-from, I get the following error when running this command
jest --config e2e/jest.config.js ...
0
votes
0
answers
96
views
NODE_ENV Not Set Correctly in React Native Project on macOS
I am working on a React Native project on macOS, and I am facing an issue where the NODE_ENV environment variable is not being set correctly. Despite trying various methods to set this variable, it ...
0
votes
1
answer
66
views
How does AST traversal with Babel affect source maps even when no changes are made?
I have a custom Webpack loader where I'm traversing through the AST of the code using Babel to change the import name of a module. However, it seems like this is affecting the source maps of modules, ...
0
votes
0
answers
38
views
Firebase Javascript package not working with jest
I have an expo app with Firebase, and I want to test it with jest and Firebase local emulators.
I tried to follow this link https://jestjs.io/docs/ecmascript-modules but it's not work.
node version: ...