yarn iOS works, but running or building for web fails

Hi ,

My project runs on Android and iOS, but now i’m trying to run it on web, it fails.

yarn web

gives

node_modules/metro-hermes-compiler/src/emhermesc.js:77
TypeError: identifier.indexOf is not a function
at Resolver.parse (/Users/…/node_modules/enhanced-resolve/lib/Resolver.js:301:31)

and

expo build:web
gives

Failed to compile.
./node_modules/aedes/node_modules/readable-stream/lib/_stream_writable.js
Cannot find module: ‘util-deprecate’. Make sure this package is installed.

You can install this package by running: yarn add util-deprecate.
Note that the util-deprecate is installed in node modules. Adding the package again will result in a next error (another package ‘missing’)

package.json

{
“name”: “myproject”,
“version”: “1.0.0”,
“main”: “index.js”,
“scripts”: {
“start”: “expo start --dev-client”,
“android”: “expo run:android”,
“ios”: “expo run:ios”,
“web”: “expo start --web”,
“postinstall”: “rn-nodeify --install assert,zlib,buffer,inherits,console,constants,crypto,dns,domain,events,stream,http,https,os,path,process,punycode,querystring,fs,string_decoder,timers,tty,url,util,net,vm --hack --yarn”,
“generate-api”: “openapi-generator generate -i docs/api.yaml -g typescript-axios -o ./src/api/ --additional-properties=paramNaming=original,typescriptThreePlus=true,supportsES6=true”,
“test”: “jest”
},
“resolutions”: {
“stream-browserify/readable-stream”: “1.0.33”,
“react-native-level-fs/levelup/bl/readable-stream”: “1.0.33”,
“fwd-stream/readable-stream”: “1.0.33”,
“react-native-level-fs/level-filesystem/fwd-stream/readable-stream”: “1.0.33”
},
“dependencies”: {
“(a)emotion/native”: “^11.0.0”,
“(a)emotion/react”: “^11.8.2”,
“(a)emotion/styled”: “^11.8.1”,
“(a)material-ui/core”: “^4.12.3”,
“(a)material-ui/icons”: “^4.11.2”,
“(a)react-native-async-storage/async-storage”: “~1.15.0”,
“(a)react-navigation/drawer”: “^6.3.1”,
“(a)react-navigation/native”: “^6.0.8”,
“(a)react-navigation/native-stack”: “^6.5.0”,
“(a)reduxjs/toolkit”: “^1.8.1”,
“(a)tradle/react-native-http”: “^2.0.0”,
“(a)types/color”: “^3.0.3”,
“aedes”: “^0.46.3”,
“assert”: “^2.0.0”,
“asyncstorage-down”: “^4.2.0”,
“axios”: “^0.26.1”,
“browserify-zlib”: “~0.1.4”,
“buffer”: “^4.9.1”,
“color”: “3.2.0”,
“console-browserify”: “^1.2.0”,
“constants-browserify”: “^1.0.0”,
“device-motion”: “^1.0.4”,
“dns.js”: “^1.0.1”,
“domain-browser”: “^1.2.0”,
“emotion-theming”: “^11.0.0”,
“events”: “^1.0.0”,
“expo”: “^45.0.2”,
“expo-auth-session”: “~3.5.0”,
“expo-cli”: “^5.3.2”,
“expo-constants”: “~13.0.1”,
“expo-dev-client”: “~0.8.4”,
“expo-random”: “~12.1.1”,
“expo-screen-orientation”: “~4.1.1”,
“expo-sensors”: “~11.1.0”,
“expo-splash-screen”: “~0.14.1”,
“expo-status-bar”: “~1.2.0”,
“expo-updates”: “~0.11.6”,
“formik”: “^2.2.9”,
“https-browserify”: “~0.0.0”,
“jwt-decode”: “^3.1.2”,
“metro-hermes-compiler”: “^0.70.2”,
“mqtt”: “^4.3.7”,
“path-browserify”: “0.0.0”,
“process”: “^0.11.0”,
“punycode”: “^1.4.1”,
“querystring-es3”: “~0.2.0”,
“react”: “17.0.2”,
“react-dom”: “17.0.1”,
“react-native”: “0.68.1”,
“react-native-crypto”: “^2.1.0”,
“react-native-gesture-handler”: “~2.1.0”,
“react-native-get-random-values”: “^1.7.2”,
“react-native-level-fs”: “^3.0.0”,
“react-native-os”: “^1.0.1”,
“react-native-paper”: “^4.11.2”,
“react-native-randombytes”: “^3.0.0”,
“react-native-reanimated”: “~2.3.1”,
“react-native-safe-area-context”: “3.3.2”,
“react-native-screens”: “~3.10.1”,
“react-native-tcp”: “^3.2.1”,
“react-native-url-polyfill”: “^1.3.0”,
“react-native-vector-icons”: “^9.1.0”,
“react-native-web”: “0.17.1”,
“react-native-wifi-reborn”: “^4.5.0”,
“react-redux”: “^7.2.8”,
“readable-stream”: “1.0.33”,
“stream”: “^0.0.2”,
“stream-browserify”: “^1.0.0”,
“string_decoder”: “^0.10.31”,
“timers-browserify”: “^1.4.2”,
“tty-browserify”: “0.0.0”,
“url”: “^0.10.3”,
“util”: “^0.12.4”,
“vm-browserify”: “^0.0.4”,
“yup”: “^0.32.11”,
“yup-phone”: “^1.3.2”
},
“devDependencies”: {
“(a)babel/core”: “^7.12.9”,
“(a)openapitools/openapi-generator-cli”: “^2.4.26”,
“(a)types/jest”: “^27.4.1”,
“(a)types/react”: “~17.0.21”,
“(a)types/react-native”: “~0.64.12”,
“jest”: “^27.5.1”,
“rn-nodeify”: “^10.3.0”,
“ts-jest”: “^27.1.4”,
“typescript”: “~4.3.5”
},
“private”: true,
“react-native”: {
“zlib”: “browserify-zlib”,
“console”: “console-browserify”,
“constants”: “constants-browserify”,
“crypto”: “react-native-crypto”,
“dns”: “dns.js”,
“net”: “react-native-tcp”,
“domain”: “domain-browser”,
“http”: “@tradle/react-native-http”,
“https”: “https-browserify”,
“os”: “react-native-os”,
“path”: “path-browserify”,
“querystring”: “querystring-es3”,
“fs”: “react-native-level-fs”,
“_stream_transform”: “readable-stream/transform”,
“_stream_readable”: “readable-stream/readable”,
“_stream_writable”: “readable-stream/writable”,
“_stream_duplex”: “readable-stream/duplex”,
“_stream_passthrough”: “readable-stream/passthrough”,
“stream”: “stream-browserify”,
“timers”: “timers-browserify”,
“tty”: “tty-browserify”,
“vm”: “vm-browserify”
},
“browser”: {
“zlib”: “browserify-zlib”,
“console”: “console-browserify”,
“constants”: “constants-browserify”,
“crypto”: “react-native-crypto”,
“dns”: “dns.js”,
“net”: “react-native-tcp”,
“domain”: “domain-browser”,
“http”: “@tradle/react-native-http”,
“https”: “https-browserify”,
“os”: “react-native-os”,
“path”: “path-browserify”,
“querystring”: “querystring-es3”,
“fs”: “react-native-level-fs”,
“_stream_transform”: “readable-stream/transform”,
“_stream_readable”: “readable-stream/readable”,
“_stream_writable”: “readable-stream/writable”,
“_stream_duplex”: “readable-stream/duplex”,
“_stream_passthrough”: “readable-stream/passthrough”,
“stream”: “stream-browserify”,
“timers”: “timers-browserify”,
“tty”: “tty-browserify”,
“vm”: “vm-browserify”
},
“volta”: {
“node”: “16.15.0”,
“yarn”: “1.22.18”
}
}

and
babel config

module.exports = function(api) {
api.cache(true);
return {
presets: [‘babel-preset-expo’],
plugins: [‘react-native-reanimated/plugin’],
};
};

and app.json
{
“expo”: {
“name”: “myproject”,
“slug”: “myproject”,
“owner”: “owner”,
“version”: “1.0.0”,
“orientation”: “default”,
“icon”: “./assets/icon.png”,
“splash”: {
“image”: “./assets/splash.png”,
“resizeMode”: “contain”,
“backgroundColor”: “#ffffff
},
“updates”: {
“fallbackToCacheTimeout”: 0
},
“assetBundlePatterns”: [
“**/*”
],
“ios”: {
“supportsTablet”: true,
“requireFullScreen”: true,
“bundleIdentifier”: “com.bladibla.bla”
},
“android”: {
“adaptiveIcon”: {
“foregroundImage”: “./assets/adaptive-icon.png”,
“backgroundColor”: “#FFFFFF
},
“package”: “com.bladibla.bla”
},
“web”: {
“favicon”: “./assets/favicon.png”
},
“scheme”: “bladibla”,
“originalFullName”: “@bladibla…”,
“plugins”: [
“react-native-wifi-reborn”
]
}
}

Anyone got a suggestion where to start?

kind regards