Closed francis-vila closed 1 year ago
I created a fresh sandbox in CodeSandBox, based on the template React Native > github
I added the dependency to fs-extra
I added the import: import fs from "fs-extra"
import fs from "fs-extra"
I get the error TypeError process.emitWarning is not a function
TypeError process.emitWarning is not a function
Here is a copy of the package.json file:
"name": "react-native", "version": "1.0.0", "description": "React Native for Web starter template", "keywords": [], "main": "src/index.js", "dependencies": { "fs-extra": "11.1.0", "react": "17.0.2", "react-art": "17.0.2", "react-dom": "17.0.2", "react-native-web": "0.16.1", "react-scripts": "4.0.3" }, "devDependencies": {}, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" } }
fs-extra is designed to work with Node.js; AFAIK, it does not work in react-native.
fs-extra
I created a fresh sandbox in CodeSandBox, based on the template React Native > github
I added the dependency to fs-extra
I added the import:
import fs from "fs-extra"
I get the error
TypeError process.emitWarning is not a function
Here is a copy of the package.json file: