NervJS / taro-ui-sample

基于 Taro 的多端 UI 库示范用例
69 stars 43 forks source link

Cannot use 'in' operator to search for 'enableDll' #4

Open GiantappMan opened 5 years ago

GiantappMan commented 5 years ago

windows10 报错

npm run dev:h5
dcsan commented 5 years ago

also on OSX:

yarn dev:h5
yarn run v1.16.0
$ npm run build:h5 -- --watch
npm WARN lifecycle The node binary used for scripts is /var/folders/wl/fsxhspwn0351_lx_55rkwgwc0000gn/T/yarn--1563213732036-0.7022446360244046/node but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> explor@1.0.0 build:h5 /Users/dc/dev/tix/recobot/stack/explor
> taro build --type h5 "--watch"

👽 Taro v1.3.9

开始编译项目 explor
创建  发现文件  src/app.styl
创建  发现文件  src/app.tsx
创建  发现文件  src/index.html
创建  发现文件  src/actions/counter.ts
创建  发现文件  src/constants/counter.ts
创建  发现文件  src/reducers/counter.ts
创建  发现文件  src/reducers/index.ts
创建  发现文件  src/store/index.ts
创建  发现文件  src/pages/index/index.styl
创建  发现文件  src/pages/index/index.tsx
(node:85407) UnhandledPromiseRejectionWarning: TypeError: Cannot use 'in' operator to search for 'enableDll' in /Users/dc/dev/tix/recobot/stack/explor
    at Object.<anonymous> (/Users/dc/dev/tix/recobot/stack/explor/node_modules/@tarojs/webpack-runner/dist/index.js:108:25)
    at Generator.next (<anonymous>)
    at /Users/dc/dev/tix/recobot/stack/explor/node_modules/@tarojs/webpack-runner/dist/index.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/dc/dev/tix/recobot/stack/explor/node_modules/@tarojs/webpack-runner/dist/index.js:3:12)
    at exports.default (/Users/dc/dev/tix/recobot/stack/explor/node_modules/@tarojs/webpack-runner/dist/index.js:98:31)
    at Compiler.<anonymous> (/Users/dc/.config/yarn/global/node_modules/@tarojs/cli/dist/h5/index.js:153:13)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/dc/.config/yarn/global/node_modules/@tarojs/cli/dist/h5/index.js:4:58)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
(node:85407) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:85407) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

➜ explor git:(master) ✗ n node/12.6.0 ➜ explor git:(master) ✗ yarn -v 1.16.0 ➜ explor git:(master) ✗ npm -v 6.9.0 ➜ explor git:(master) ✗ node -v v12.6.0

dcsan commented 5 years ago

looks like config is a string/path to my dev directory:

config is: /Users/dc/dev/tix/recobot/stack/explor

    else {
        if ('enableDll' in config) {
            warnConfigEnableDll();
        }
dcsan commented 5 years ago
 taro info
👽 Taro v1.3.9

  Taro CLI 1.3.9 environment info:
    System:
      OS: macOS 10.14.5
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 12.6.0 - /usr/local/bin/node
      Yarn: 1.16.0 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
    npmPackages:
      @tarojs/async-await: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/components: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/plugin-babel: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/plugin-csso: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/plugin-stylus: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/plugin-uglifyjs: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/redux: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/redux-h5: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/router: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro-alipay: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro-h5: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro-swan: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro-tt: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/taro-weapp: 1.3.0-beta.3 => 1.3.0-beta.3
      @tarojs/webpack-runner: 1.3.0-beta.3 => 1.3.0-beta.3
      eslint-config-taro: 1.3.0-beta.3 => 1.3.0-beta.3
      eslint-plugin-taro: 1.3.0-beta.3 => 1.3.0-beta.3
      nerv-devtools: ^1.4.0-beta.3 => 1.4.3
      nervjs: ^1.4.0-beta.3 => 1.4.3
    npmGlobalPackages:
      typescript: 3.5.2
schizobulia commented 5 years ago

参考链接