Buy Verified Wise Accounts

Buy Verified TransferWise Account (Wise)

Buy Verified Wise Accounts, 100% Safe With Documents We provide the best quality fully verified UK, US, and CA Accounts. Email & phone numbers, ID Card and Bank verified and Credit Card verified Wise accounts buy those safe accounts from us.

We are working with the largest team and we are instant start work after your place order. So, Buy our Service and enjoy it..

Our Service Quality
⇒ Email Access
⇒ Account Access
⇒ Bank Verified
⇒ Bank Statement copy provided
⇒ Account Access
⇒ Phone confirmed and has access
⇒ Date of Birth Provided
⇒ Documents ( Nid card scan copy+ utility invoice scan copy)
⇒ Full Verified Wise Account (Fresh, Old, History 3 kinds of account we sell)
⇒ Money-Back Guarantee
⇒ 24/7 Customer Support

24/7 Ready to Contact:-
⏩ Email: [email protected]
⏩ Skype: BankTrustAccount
⏩ Telegram: @BankTrustAccount

Passportjs .authenticate doesn’t run/finish running

Im trying to use passportjs to authenticate a users sign in. When passport.authenticate runs on the login post request, the webpage will never continue to the success or failure routes. This is the relevant controller.

const User = require("../models/user");
const Message = require("../models/message");
const session = require("express-session");
const passport = require("passport");
const bcrypt = require("bcryptjs");
const LocalStrategy = require("passport-local").Strategy;

const { body, validationResult } = require("express-validator");

const asyncHandler = require("express-async-handler");

passport.use(
  new LocalStrategy(async (username, password, done) => {
    try {
      const user = await User.findOne({ username: username });
      if (!user) {
        console.log("successfully found user");
        return done(null, false, { message: "Incorrect username" });
      }
      if (user.password !== password) {
        console.log("matching password");
        return done(null, false, { message: "Incorrect password" });
      }
      return done(null, user);
    } catch (err) {
      return done(err);
    }
  })
);

passport.serializeUser((user, done) => {
  done(null, user.id);
});

passport.deserializeUser(async (id, done) => {
  try {
    const user = await User.findById(id);
    done(null, user);
  } catch (err) {
    done(err);
  }
});

exports.get_user_signup = asyncHandler(async (req, res, next) => {
  res.render("signup");
});
exports.post_user_signup = asyncHandler(async (req, res, next) => {
  if (req.body.password !== req.body.confirmpassword) {
    res.redirect("/sign-up");
  }
  const user = new User({
    username: req.body.username,
    password: req.body.password,
    status: true,
  });
  await user.save();
  res.redirect("/");
});
exports.get_user_login = (req, res, next) => {
  res.render("login");
};

exports.post_user_login = [
  (req, res, next) => {
    passport.authenticate("local", {
      successRedirect: "/",
      failureRedirect: "/",
    });
  },
];

If i put a redirect following the authentication attempt it immediatly redirects to that pages and the user is not logged in. Putting in a console.log in the local strategy never shows so I dont think the function is ever running.

Safe to Mutate State Object Directly in useEffect? (React & Immutability)

Lets init a state, giving object as initial state. To update any property of the object, we usually clone state and re-set using setter.

But in following example, without any setter, I can update properties of that object and they are reflected on the dom without any complain.

import React, {useState, useEffect} from 'react';

export function App(props) {
  const [x, setX] = useState({test: 0}) // setter is never used
  const [y, setY] = useState(0)

  useEffect(()=>{
    x.test = x.test + 1
  }, [y])

  return (
    <div className='App'>
      <h1>x = {x.test}</h1>
      <button onClick={() => setY(y+1)}>Increase</button>
    </div>
  );
}

I assume this behavior is related to the mutable nature of objects in JavaScript.

Question is, can this code lead to any adverse effects?

Also, this can be produced only inside a useEffect hook. if I changed my code as

<button onClick={() => x.test = x.test + 1}>Increase</button>

this will no longer works. Why there is a difference, if we mutate the same object?

How do we encode quotes in key of element for json_enode in PHP to be properly decoded by JSON.parse in JS?

In my PHP script, I have a variable that represents pairs of characters to be converted, among them quote (“) to stripped quote (“)

$a = [
    '"'=> '"',
];

To pass this on to JavaScript, I embed this variable into an inline script.

var a = JSON.parse('<?= json_encode($a) ?>');

or

var a = <?= json_encode($a) ?>;

The problem is that, after the line is rendered as

var a = JSON.parse('{""":"\""}');

I get the following error

Uncaught SyntaxError: JSON.parse: expected ':' after property name in object at line 1 column 4 of the JSON data

How do I encode such data so that the original key and value will be properly passed to JavaScript with an error?

Why do these two functions not return the same result?

I’m trying to update a function to improve performance.
The old function takes ~32s and the new one takes ~350ms for the same call, but right now they are not returning the same result, and I’m not sure why.

Function parameters:

  • md5Hashes: array of strings
  • excludedTextId: string

What the function is supposed to do:

It is using the following mongoose schema:

const sentenceFeatureSchema = new mongoose.Schema({
    text_id: { type: String, required: true },
    md5_hash: { type: String, required: true },
    offset: { type: Number, required: true },
    length: { type: Number, required: true },
    num_words: { type: Number, required: true },
});

Given an array of hashes, query mongodb for all documents which match any of the md5 hashes in the given array. If excludedTextId is provided, do not include those documents which have the same textId. The hashes and textids are not exclusive, meaning that any document can have any combination of textid and hash (there can even be multiple documents which have both the same id and hash, but will differ in other values).

Note: It should only be querying for the data it needs, because there are a lot of documents in the system, so trying to query for more than we need and then using only what we need must be avoided.

Problem

My new implementation is not returning the same result as the original one. I believe the new implementation is correct and the old one is not, but I may be wrong. Either way, I’d like to understand exactly what and why they are returning different results.

Original function

const getMatchingHashSentences = async (md5Hashes, excludedTextId = null) => {
    try {
        const entries = [];

        for (const md5Hash of md5Hashes) {
            const queryConditions = { md5_hash: md5Hash };
            if (excludedTextId) {
                queryConditions.text_id = { $ne: excludedTextId };
            }
            const result = await SentenceFeature.find(queryConditions);
            entries.push(...result);
        }
        logger.debug(`entries length: ${entries.length}`);
        return entries;
    } catch (error) {
        throw error;
    }
};

New function

I tried to make it into a single db request.

const getMatchingHashSentences = async (md5Hashes, excludedTextId = null) => {
    try {
        const query = SentenceFeature.find({ md5_hash: { $in: md5Hashes } });

        if (excludedTextId) {
            query.where("text_id").ne(excludedTextId);
        }

        const results = await query.exec();
        return results;
    } catch (error) {
        throw error;
    }
};

Webpack Module Federation remote.js not updating (possibly cached)

I am working on setting up a webpack build using module federation. Everything was working fine, I was able to run a build on the child app and the parent app would build with the updates.

However I started noticing that my updates were not coming through. After extensive testing I completely cleared the server hosting my child app and to my surprise the parent app was still rendering the child.

This leads my to believe my webpack federation folder is being cached somehow. I am quite new to this so any guidance would be helpful.

Child App config

const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
// import ModuleFederationPlugin from webpack
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin')
const { ImportMetaEnvWebpackPlugin } = require('import-meta-env-webpack-plugin')
const path = require('path')

module.exports = {
  entry: './src/entry.ts',
  mode: 'development',
  devServer: {
    port: 3000,
  },
  module: {
    rules: [
      {
        test: /.tsx?$/,
        use: [
          {
            loader: 'ts-loader',
            options: {
              configFile: 'tsconfig.webpack.json',
            },
          },
        ],
        exclude: /node_modules/,
      },
      {
        test: /.(png|jpe?g|gif)$/i,
        use: [
          {
            loader: 'file-loader',
          },
        ],
      },
      {
        test: /.(js|jsx)?$/,
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env', '@babel/preset-react'],
            },
          },
        ],
      },
      {
        test: /.css$/i,
        use: ['style-loader', 'css-loader'],
      },
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
    alias: {
      process: 'process/browser',
    },
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: './public/index.html',
    }),
    new ModuleFederationPlugin({
      name: 'ReferralsUI',
      filename: 'remoteEntry.js',
      exposes: {
        './GridApp': './src/GridApp.tsx',
      },
      shared: {
        react: {
          singleton: true,
          version: '18.2.0',
          requiredVersion: '18.2.0',
        },
        'react-dom': {
          singleton: true,
          version: '18.2.0',
          requiredVersion: '18.2.0',
        },
        'react-router-dom': {
          singleton: true,
          version: '6.21.3',
          requiredVersion: '6.21.3',
        },
        '@mui/material': {
          singleton: true,
          version: '5.15.6',
          requiredVersion: '5.15.6',
        },
      },
    }),
    // fix "process is not defined" error:
    new webpack.EnvironmentPlugin([
      'VITE_REFERRAL_API_URL',
      'VITE_REFERRAL_API_KEY',
      'VITE_COMMON_API_URL',
      'VITE_COMMON_API_KEY',
      'VITE_SECURITY_API_URL',
      'VITE_SECURITY_API_KEY',
      'VITE_COMMON_BUSINESS_API_URL',
      'VITE_COMMON_BUSINESS_API_KEY',
    ]),
  ],
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
    alias: {
      process: 'process/browser',
    },
  },
  target: 'web',
  output: {
    path: path.resolve(__dirname, 'dist/federation'),
  },
}

Host App Config

import path from 'path'
import CopyWebpackPlugin from 'copy-webpack-plugin'
import * as webpack from 'webpack'
import type * as webpackDevServer from 'webpack-dev-server'
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin')

type Configuration = webpack.Configuration

const config: Configuration = {
  mode:
    (process.env.NODE_ENV as 'production' | 'development' | undefined) ??
    'development',
  entry: './src/index.tsx',
  module: {
    rules: [
      {
        test: /.tsx?$/,
        use: 'ts-loader',
        exclude: /node_modules/,
      },
      {
        test: /.css$/,
        use: ['style-loader', 'css-loader'],
      },
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
    alias: {
      process: 'process/browser',
    },
  },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist'),
    clean: true,
    publicPath: '/',
  },
  plugins: [
    new CopyWebpackPlugin({
      patterns: [{from: 'public'}],
    }),
    new webpack.DefinePlugin({
      'process.env': {
        REACT_APP_ENVIRONMENT: JSON.stringify('development'),
      },
    }),
    new webpack.EnvironmentPlugin([
      'REACT_APP_ENVIRONMENT',
      'REACT_APP_COMMON_API_URL',
      'REACT_APP_NAME',
      'REACT_APP_COMMON_API_URL',
      'REACT_APP_COMMON_BACKEND_APP_KEY',
      'REACT_APP_COMMON_APP_TYPE',
      'REACT_APP_APPLICATIONNAME',
      'REACT_APP_SUBMISSION_API_URL',
      'REACT_APP_SUBMISSION_API_KEY',
      'REACT_APP_PROPERTY_API_URL',
      'REACT_APP_PROPERTY_API_KEY',
      'REACT_APP_PROPERTY_COMMON_API_URL',
      'REACT_APP_PROPERTY_COMMON_API_KEY',
      'REACT_APP_REFERENCE_API_URL',
      'REACT_APP_SECURITY_API_URL',
      'REACT_APP_SECURITY_API_KEY',
    ]),
    new ModuleFederationPlugin({
      name: 'G2Property',
      remotes: {
        ReferralsUI: `ReferralsUI@${process.env.REACT_APP_URL_REFERRALS_UI}`,
      },
      shared: {
        react: {
          singleton: true,
          version: '18.2.0',
          requiredVersion: '18.2.0',
        },
        'react-dom': {
          singleton: true,
          version: '18.2.0',
          requiredVersion: '18.2.0',
        },
      },
    }),
  ],
  devServer: {
    server: 'https',
    historyApiFallback: {
      index: 'index.html',
    },
    static: {
      directory: path.join(__dirname, 'public'),
    },
    compress: true,
    port: 3200,
  },
}

export default config

Blazor – get relatedTarget on focus out event

I wan’t to make something simmilar with this in Blazor. But I don’t understand how can I get relatedTarget on focusout event. I know about JsInterop but I’m not sure I can use it with events…

<script>
document.getElementById('myinput').addEventListener('focusout', focusout);

function focusout(event) {
        if (event.relatedTarget != select) {
            ...
        }
    }
</script>

How to Configure Separate Paths for Components and Shared/Utils in a Vite React Library

I have a Vite-based React library, currently structured like this:

import { Button, Typography, Box, Flex, Color, TypographyVariant } from '@placeholder-library';

I want to separate the imports so that components and shared/utils are imported from different paths:

import { Button, Typography, Box, Flex } from '@placeholder-library/components’;
import { Color, TypographyVariant } from ‘@placeholder-library/shared’;

vite.config.ts:

import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import svgr from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
import commonjs from 'vite-plugin-commonjs';

export default defineConfig({
  resolve: {
    alias: {
      src: path.resolve(__dirname, './src'),
    },
  },
  build: {
    outDir: 'build',
    lib: {
      entry: './src/index.ts',
      name: 'Placeholder Library',
      fileName: 'index',
    },
    rollupOptions: {
      external: ['react', 'react-dom'],
      output: [
        {
          globals: {
            react: 'React',
            'react-dom': 'ReactDOM',
          },
        },
        {
          dir: 'build/cjs',
          format: 'cjs',
          globals: {
            react: 'React',
            'react-dom': 'ReactDOM',
          },
        },
        {
          dir: 'build/esm',
          format: 'esm',
          globals: {
            react: 'React',
            'react-dom': 'ReactDOM',
          },
        },
      ],
    },
    sourcemap: true,
    emptyOutDir: true,
  },
  plugins: [
    svgr(),
    react(),
    commonjs(),
    tsconfigPaths(),
    dts({
      outDir: ['build/cjs', 'build/esm', 'build'],
      include: ['./src/**/*'],
      exclude: ['**/*.stories.*'],
    }),
  ],
});

package.json:

{
  "name": "@placeholder-library",
  "version": "0.0.26",
  "description": "Placeholder Library components library",
  "license": "ISC",
  "main": "build/cjs/index.js",
  "module": "build/index.mjs",
  "files": ["*"],
  "scripts": {
    "build": "tsc && vite build",
    "build-storybook": "storybook build",
    "build-storybook-docs": "storybook build --docs",
    "dev": "vite",
    "format": "prettier --write .",
    "lint:fix": "eslint . --fix --ignore-path .gitignore",
    "prepare": "husky install",
    "preview": "vite preview",
    "storybook": "storybook dev -p 6006",
    "storybook-docs": "storybook dev --docs"
  },
  "dependencies": {
    "..."
  },
  "devDependencies": {
    "..."
  },
  "peerDependencies": {
    "react": "^18.2.0"
  }
}

How can I configure Vite and my package structure to achieve this separation of components and shared/utils? Any advice or examples would be greatly appreciated.

I attempted to modify the vite.config.ts file to include separate entries for components and shared/utils, but I couldn’t figure out how to properly configure the paths. I also tried to adjust the package.json file to specify different entry points for components and shared/utils, but I wasn’t sure how to structure it correctly.

import { Button, Typography, Box, Flex } from '@placeholder-library/components’;

import { Color, TypographyVariant } from ‘@placeholder-library/shared’;

However, I couldn’t find a clear example or documentation on how to set this up in a Vite-based React library. Any guidance or examples on how to achieve this would be greatly appreciated.

All tests are being considered “timed out” but my mutation score is 100%

I’m trying to run mutation testing with Stryker on my project which uses JEST to run unit testing.

I didn’t get any errors, but all the tests are getting the “timeout” status, however, my mutation score is 100%.

Is this correct? Can I accept this as a good result? Or that something wrong happened?
enter image description here

I installed the Stryker library, and ran the command “npx stryker run”

how to updated nested state array in extrareducer

I am looking for solution that when I get API response then I want to update searches in the initial state but I am unable to do. because the solutions provided on internet like

state.searches = data

this is not work for me I have tried on push and concat as well but still they are not for me

import {createSlice, createAsyncThunk} from "@reduxjs/toolkit"
import { ENDPOINTS } from "../../backend/API"
import axios from "axios"

//SEARCH TENANT AXIOS CALL USING ASYNC THUNK
export const searchTenants = createAsyncThunk("searchTenants", async (data) => {
    try {
        //Creating API call using ENDPOINTS as Base URL (/api/tenants/search)
        return await axios.post(ENDPOINTS.SEARCH_TENANTS, data).then(res => res.data)
    } catch (error) {
        //Incase of error catch error
        return error.response.data.error[0]
    }
})


//Creating Tenants Slice
export const tenantSlice = createSlice({
    name: "tenants",
    initialState: {
        current: {},
        data: [],
        searches: []
    },
    reducers:{
        clearTenants(){
            return {
                current: {},
                data: [],
                searches: []
            }
        }
    },
    extraReducers: (builder) => {
        
        //@CaseNo       01
        //@Request      POST
        //@Status       Success
        //@Loading      False
        //@Data         Searched Data stored in state
        builder.addCase(searchTenants.fulfilled, (state, action) => {
           //Check for request success
           if(action.payload.success === true){
            
                const searches = action.payload.data
                console.log("state is working")
                state.searches = data
                //return [...state.searches, ...searches]
                // state.searches.push({id: "demo"})
            }
            // return state 
            // return actions.payload
        })
        
    }
})

//Export Reducer functions
export const {clearTenants} = tenantSlice.actions
export default tenantSlice.reducer ```

Setting button/other element display state based on form input values using Hotwire Stimulus

I have a form which has a text input, a file input, and a submit button.

I want to modify the display of the button in response to input changes, where it should be enabled if either of the input types are present, and disabled otherwise.

Here is my current implementation.
I define two flags in the Stimulus controller:

static values = {
        hasAttachments: Boolean,
        hasTextInput: Boolean
    }

When the user enters text or selects a file, I set the flags manually based on the input change.

Next, I use two [...]valueChanged() Stimulus methods that respond to these flags being updated and are basically doing the exact same thing:

hasAttachmentsValueChanged() {
        this.setSendBtnState(this.hasAttachmentsValue || this.hasTextInputValue);
    }

    hasTextInputValueChanged() {
        this.setSendBtnState(this.hasTextInputValue || this.hasAttachmentsValue);
    }

Lastly I have the setSendBtnState() method that makes changes to the display of the button:

setSendBtnState(enabled) {
        if (enabled) {
            this.sendBtnTarget.classList.remove("disabled")
            this.sendBtnTarget.removeAttribute("disabled")
        } else {
            this.sendBtnTarget.classList.add("disabled")
            this.sendBtnTarget.setAttribute("disabled", "disabled")
        }
}

Question: How can I improve this implementation to:

  1. Avoid duplicating the same code in the valueChanged() methods
  2. Is there a way to have Simulus track the presence of form inputs without me setting those flags manually whenever inputs are changed?
  3. How can I avoid code duplication if I need to write another setState() method that controls display of some other part of the form, but essentially does the same thing and responds to the same flags, albeit setting a different attribute?

ThemeProvider from NextUI causing Warning: Extra attributes from the server: class,style

I’ve added NextUI to my NextJS 14 app

The issue has been isolated to the ThemeProvider in my main providers.tsx file:

'use client';

import { NextUIProvider } from '@nextui-org/react';
import { ThemeProvider as NextThemesProvider } from 'next-themes';

export default function Providers({ children }: { children: React.ReactNode }) {
  return (
    <NextUIProvider>
      <NextThemesProvider // <-- the issue
        attribute="class"
        defaultTheme="dark"
        themes={['light', 'dark', 'modern']}
      >
        {children}
      </NextThemesProvider>
    </NextUIProvider>
  );
}

The problem is this specifically, because if I remove it the error goes away:

<NextThemesProvider
    attribute="class"
    defaultTheme="dark"
    themes={['light', 'dark', 'modern']}
>

The warning

**Warning: Extra attributes from the server: class,style
    at html
    at RedirectErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:73:9)
    at RedirectBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/redirect-boundary.js:81:11)
    at NotFoundErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:76:9)
    at NotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/not-found-boundary.js:84:11)
    at DevRootNotFoundBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/dev-root-not-found-boundary.js:33:11)
    at ReactDevOverlay (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/internal/ReactDevOverlay.js:84:9)
    at HotReload (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/react-dev-overlay/hot-reloader-client.js:307:11)
    at Router (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:182:11)
    at ErrorBoundaryHandler (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:114:9)
    at ErrorBoundary (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/error-boundary.js:161:11)
    at AppRouter (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/components/app-router.js:538:13)
    at ServerRoot (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:129:11)
    at RSCComponent
    at Root (webpack-internal:///(app-pages-browser)/./node_modules/next/dist/client/app-index.js:145:11)**

When I dive into the ThemeProvider type:

interface ThemeProviderProps {
    /** List of all available theme names */
    themes?: string[] | undefined;
    /** Forced theme name for the current page */
    forcedTheme?: string | undefined;
    /** Whether to switch between dark and light themes based on prefers-color-scheme */
    enableSystem?: boolean | undefined;
    /** Disable all CSS transitions when switching themes */
    disableTransitionOnChange?: boolean | undefined;
    /** Whether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons */
    enableColorScheme?: boolean | undefined;
    /** Key used to store theme setting in localStorage */
    storageKey?: string | undefined;
    /** Default theme name (for v0.0.12 and lower the default was light). If `enableSystem` is false, the default theme is light */
    defaultTheme?: string | undefined;
    /** HTML attribute modified based on the active theme. Accepts `class` and `data-*` (meaning any data attribute, `data-mode`, `data-color`, etc.) */
    attribute?: string | 'class' | undefined;
    /** Mapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value */
    value?: ValueObject | undefined;
    /** Nonce string to pass to the inline script for CSP headers */
    nonce?: string | undefined;
    /** React children */
    children: React.ReactNode;
}

class is ok to send into the attribute prop, is this an issue that React doesn’t like?

I’ve found a few similar issues, but none related to NextUI, any thoughts on how I can remove this warning / error from the console?


I did have a custom ThemeContext I created, but I still get the error warning after I comment it out:

import { FC, ReactNode } from 'react';
import Providers from '@/redux/provider';
import MainHeader from '@/components/mainheader';
import SideBar from '@/components/sidebar';
// import { ThemeProvider } from '@/context/ThemeContext';
import { User } from '@/types/user';

interface layoutProps {
  children: ReactNode;
}

// const user: User = {
//   theme: 'dark',
// };

const Layout: FC<layoutProps> = ({ children }) => {
  return (
    // <ThemeProvider user={user}>
    <main>
      <MainHeader />
      <SideBar />
      <Providers>{children}</Providers>
    </main>
    // </ThemeProvider>
  );
};

export default Layout;

how to fix error npm ERR! Unexpected token ‘.’ when use npm install

When I use npm install in react-native project use expo then have error enter image description here

My project has some package which have to use node > 18. This is my package.json enter image description here

I try to run npm install which node < 16 then have not Unexpected token ‘.’ but some package doesn’t install. So I can run project.

I also try to remove node module and try again but not ok
I also try to npm install -g npm@latest but not ok
All use npm are not ok
I want to T can run npm install when use node >= 18
Help me :((((