How can I use webpack with express?

When I try to use webpack with a simple express server I always get TONS of errors: express.js 'use strict'; var express = require('express'); var path = require('path'); var url =...

npm install multiple package names

What does it do when I run this command: npm install --save-dev package1 package2 It is definitely not installing multiple packages, but it looks to be essential. (For example...

How to remove ESlint error no-unresolved from importing 'react'

no-unresolved https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md After installing eslint-import-resolver-webpack My .eslintrc config { "extends":...

Eslint cannot read config file

I am setting up my first eslint. For some reason in other computers it works except on mine .. Im using VScode As soon as I open my editor I get the following message: Cannot read config...

TypeScript - [Subsequent property declarations must have the same time] - Multiple references to the same type definitions

I'm rather new to using TypeScript and Webpack and unfortunately keep running into an issue with my type declarations that I just cant seem to resolve. To put it simply my project is a ASP.NET MVC...

dotenv values not loaded in nextjs

I am struggling to load my .env file in my NextJS app. Here is my code: My .env is in root / My index.js is in /pages/index.js Here is my index.js: require("dotenv").config({ path: __dirname +...

Convert string parameter to an array of one element

I wrote a function which has to support two types of a paramter names for a list of values. Internally it deals with the parameter as an array. A single name is given as string and multiples names...

Jest encountered an unexpected token (React, Typescript, Babel, Jest & Webpack setup)

I've setup a project using React, Typescript, Babel, Webpack, with Prettier & EsLint. I set the project up from scratch and had everything working nicely. I've just started to use Jest however and...

Duplicate ReactJS import issue when using npm link to test component before publishing as npm package

I have a simple component like this. import React, {useState} from 'react'; function MyComponentWithState(props) { const [value, setValue] = useState(0); return ( <p>My value is:...

How to resolve: "Definition for rule '@typescript-eslint/consistent-type-assertions' was not found"

My React app is not failing to compile due to the error: Definition for rule '@typescript-eslint/consistent-type-assertions' was not found I'm kind of at a loss. I'm unable to find any current...

How to resolve "Cannot use import statement outside a module" in jest

I have a React application (not using Create React App) built using TypeScript, Jest, Webpack, and Babel. When trying to run "yarn jest", I get the following error: I have tried removing all...

React Native: App crashes on start due to SoLoader issue

I'm having issues with my app on Android (iOS is running fine). Every time I do the build, when I open the application it closes before starting. I have tried many solutions that I have been...

error: bundling failed: TypeError: Cannot read property 'transformFile' of undefined, React Native

I receive this error whenever I run react-native start, but this started happening recently after I had installed firebase-tools and stripe in my node modules, but before that it would run just...

Cannot install Firebase for VueJS + NodeJS

I am using vueJS to build an authentication (login) page with Firebase, each time when I run: npm run serve I have the same error asking me to install Firebase: `Failed to compile with 7 errors ...

Can't install grpc npm-package

I have a problem with grpc npm-package. When I run a npm i it starts with: > [email protected] install C:\RELOG\relog\node_modules\grpc > node-pre-gyp install --fallback-to-build...

react-native-webview how to inject javascript?

On Android, I had been using expo-stripe-checkout for payments on an Expo managed app. Everything was working fine until I updated to the newest version of expo and react-native. Now, none of the...

Webpack does not resolve less loader

I'm getting crazy about the configuration of my React-Typescript-Webpack application. It is built from scratch - no create-react-app - and should work with the UI library "antd" and "storybook" as...

Seeing unknown typescript error in JSConfig.json file

I added a jsconfig.json to my project and for some reason I am getting a typescript error that states dotenv/types not found. I cannot for the life of me figure out why I am getting this error. I...

Ts-node : SyntaxError: Cannot use import statement outside a module

I was trying to use the top level in the project and saw that it was necessary to change the module from tscofnig to esnext or system, but for some reason my ts-node's error. And I already put the...

Angular: node_modules/@types/babel _traverse/index.d.ts(1137,43): error TS1109: Expression expected

I am currently stucked in very weird issue in Angular. I was working on one my branch a week ago it was fine and building correctly. But I don't know how it start complaing during 'ng build' below...

Webpack error "Module build failed: ERR_INVALID_ARG_TYPE"

I'm pretty new to react and am having some issues with web pack. All I'm trying to do is import a SVG file into my react project. I'm lost as to what is causing this as it doesn't give me much...

Redux - Undefined is not an object (evaluating 'store.getState')

I'm learning reactNative and I cannot resolve an error. In the tutorial I'm following, we want to allow user to be able to add (or remove) movie to favourites and for that we are using Redux....

Eslint behaves differently between local and CI

It seems that eslint behaves different in GitHub actions and in local. On local I don't get any errors a part from ts warning which are fine. Wheres in the github actions I seems to get more...

How to fix error "Failed to compile : ./node_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41)"

I am trying to create a react-typescript app along with leaflet. I used the command, npm install leaflet react-leaflet @types/react @types/leaflet --save to install the dependencies. But when I...

Jest encountered an unexpected token for NUXT typescript

have been searching for two days, tried many answers, but couldn't find a solution. any clue? below are my config files. please any help? jest.config.js module.exports = { moduleNameMapper: { ...

Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) on github actions

i have created an github action to deploy the code when pushed. it cause this error when installing the packages. Run npm i --no-optional && cd client && npm i --no-optional && cd .. npm WARN...

Craco unable to build react app when Deployed in Heroku

Been at it for two days and stumped.. tried every solution I can find on stackoverflow. Trying to deploy my MERN stack app with tailwind on Heroku. It seems Craco/tailwind is giving me...

ESlint - Error: Must use import to load ES Module

I am currently setting up a boilerplate with React, Typescript, styled components, webpack etc. and I am getting an error when trying to run eslint: Error: Must use import to load ES Module Here...

React-Native Warning: Overwriting font Family style attribute preprocessor

I'm getting the following warning: "*Overwriting font Family style attribute preprocessor*" coming out from StyleSheet.js when running the app on iOS simulator. I haven't tested on Android yet...

This version of CLI is only compatible with Angular versions ^13.0.0, but Angular version 12.2.13 was found instead

My Ionic project was running fine a month ago. Today when I tried ionic serve or ionic build then I get the below error: My simple question is What CLI version is compatible with Angular version...