Unable to resolve module fs from /...mypath
当我试图将节点模块导入我的react原生应用程序时,我得到了这个错误。
该模块以这种方式使用“fs”:
var fs = require('fs');
var list = JSON.parse(fs.readFileSync(__dirname + '/list.json', 'utf8'));
我怎样才能纠正我的错误。我需要从我的资产文件夹显示一个pdf。我正在使用世博,反应本地,反应-原生-pdf
Scanning folders for symlinks in C:\Users\kjdelacruz\mobile\cdo-mobile-organizer\node_modules (31ms)
RNFetchBlob checking app version ..
RNFetchBlob detected app version => 6
Add Android permissions => false
react-native-fetch-blob link FAI
我已经升级了react-从0.64.1版升级到0.65.0-rc.3版,因为targetSdk=30需要从8月21日开始向Google发布一个包。我正在使用升级信件,现在我收到了./gradlew bundleRelease错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseAssets'.
> Could not resolve all files for configuration ':app:r
我遇到的问题是,当我需要库时,所有城市的reactjs都不能工作,并返回此错误:
TypeError: fs.readFileSync is not a function
(anonymous function)
C:myproject/node_modules/all-the-cities/index.js:6
3 | const path = require('path')
4 |
5 |
> 6 | var pbf = new Pbf(fs.readFileSync(path.join(__dirname, 'cities.pbf')
我使用的是 0.64 i @walletconnect/client
放在App.js 导入WalletConnect中的下面,从“@walletconnect/client”导入walletconnect;
在npx响应-本机运行-ios并获得以下错误后:
error: Error: While trying to resolve module `crypto` from file `/Users/hahaha/workspace/mobile/reactnative/nonft/node_modules/@pedrouid/iso-crypto/dist/cjs/helpers/env/n