Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro.env 的值是undefined #7854

Closed
crack-boy opened this issue Oct 16, 2020 · 1 comment
Closed

Taro.env 的值是undefined #7854

crack-boy opened this issue Oct 16, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@crack-boy
Copy link

相关平台

微信小程序

小程序基础库: 2.13.0
使用框架: React

复现步骤

console.log('Taro.env', Taro.env);

期望结果

有USER_DATA_PATH值

实际结果

返回undefined

环境信息

👽 Taro v3.0.14


  Taro CLI 3.0.14 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.18.4 - /usr/local/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.14.6 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: ^3.0.14 => 3.0.14 
      @tarojs/components: 3.0.14 => 3.0.14 
      @tarojs/mini-runner: 3.0.14 => 3.0.14 
      @tarojs/react: 3.0.14 => 3.0.14 
      @tarojs/runtime: 3.0.14 => 3.0.14 
      @tarojs/taro: 3.0.14 => 3.0.14 
      @tarojs/webpack-runner: 3.0.14 => 3.0.14 
      babel-preset-taro: 3.0.14 => 3.0.14 
      eslint-config-taro: 3.0.14 => 3.0.14 
      react: ^16.10.0 => 16.13.1 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Oct 16, 2020
@Chen-jj Chen-jj added the duplicate This issue or pull request already exists label Oct 21, 2020
@Chen-jj
Copy link
Contributor

Chen-jj commented Oct 21, 2020

Duplicate of #7392

@Chen-jj Chen-jj marked this as a duplicate of #7392 Oct 21, 2020
@Chen-jj Chen-jj closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants