为啥哩??我一直在用axois~
从零搭建React全家桶框架教程
周日上不上社区啊,有个问题还得请教下。我生产环境构建,dist文件下没东西!!控制台输出是编译成功的,不报错。
但是这句输出的"webpack output is served from / "
from后面是空的,是不是有问题?
额,找到问题啦,我蒙圈了,还是用的webpack-dev-server 启动的生产环境配置文件,我说么画风不对,控制台打印的命令确实是启动了生产环境的配置文件,居然还能自动刷新???回去npm脚本里一看,复制粘贴的时候忘记改成webpack了。。。(捂脸。。),现在只有两个问题,
1是拆分路由以后页面报错,down了你的源码也会报错。这块儿有问题吗?
2是异步请求那块,localhost:8080/api/data.json报跨域错误,改成127.0.0.1:8080/api/data.json就行了,懵逼中。。。
初学者,安装完RN环境,用react-native run-ios会异常,直接用xcode运行代码,可以运行。
异常如下:
info Found Xcode workspace " h2.xcworkspace "
info Building (using “xcodebuild -workspace h2.xcworkspace -configuration Debug -scheme h2 -destination id=D7544376-96A7-4644-A524-4A1AD0441715 -derivedDataPath build/h2”)
…
info Installing " DerivedData/Build/Products/Debug-iphonesimulator/h2.app "
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, “:CFBundleIdentifier”, Does Not Exist
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/h2.app/Info.plist
Print: Entry, “:CFBundleIdentifier”, Does Not Exist
. Run CLI with --verbose flag for more details.
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/h2.app/Info.plist
Print: Entry, “:CFBundleIdentifier”, Does Not Exist
at checkExecSyncError (child_process.js:629:11)
at Object.execFileSync (child_process.js:647:13)
at runOnSimulator (/Users/lucunlu/Documents/Fight/ReactNative/h2/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:174:45)
at process._tickCallback (internal/process/next_tick.js:68:7)
其中:
react-native-cli: 2.0.1
react-native: 0.61.1
xcode:11