English 中文(简体)
How to disable warnings about parse source map
原标题:
  • 时间:2023-04-19 14:19:55
  •  标签:
  • reactjs
  • expo

I have been working on a project in React Native using Expo. I was using Victory-native and to be able to use it on a web browser I started using webpack-config. This allowed me to run it on a browser but it also started giving me a lot of warnings. My site builds without problems but I would like to disable/get rid of the warnings. I have tried multiple things like a .env file, craco, GENERATE_SOURCEMAP=false, updating parse5, using craco alias. I dont know how to fix it. Is this fixable or should I just look for another way or just live with the warnings? WARNING in ./node_modules/parse5/dist/cjs/tree-adapters/default.js Module Warning (from ./node_modules/@expo/webpack-config/node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from . ode_modulesparse5distcjs ree-adaptersdefault.js.map file: Error: ENOENT: no such file or directory, open . ode_modulesparse5distcjs ree-adaptersdefault.js.map

问题回答

using cross-env package worked for me.

here s the blog post about it. https://bobbyhadz.com/blog/failed-to-parse-source-map-in-create-react-app

...
"scripts": {
  "start": "expo start",
  "android": "expo start --android",
  "ios": "expo start --ios",
  "web": "cross-env GENERATE_SOURCEMAP=false expo start --web"
},




相关问题
How to use one react app into another react app?

I have two react apps, parent app and child app. and child app have an hash router. I have build the child app using npm run build, It creates build folder. That build folder moved into inside the ...

how to get selected value in Ant Design

I want to print the selected value, and below is my option list: const vesselName = [ { value: 0 , label: ALBIDDA , }, { value: 1 , label: ALRUMEILA , }, { value: 2 ,...

How to add a <br> tag in reactjs between two strings?

I am using react. I want to add a line break <br> between strings No results and Please try another search term. . I have tried No results.<br>Please try another search term. but ...

热门标签