lsqy / taro-music

🎉基于taro + taro-ui + redux + react-hooks + typescript 开发的网易云音乐小程序,taro3已升级完毕,目前正在使用react-hooks重构中(不定时更新)
MIT License
1.92k stars 389 forks source link

Can't npm run dev:weapp, throw Uncaught TypeError: Function(...) is not a function. #84

Closed Eric-Zhong closed 4 years ago

Eric-Zhong commented 4 years ago

I'd clone the source code, and make the taro version as 2.0.0-beta.8. But run the command:

npm run dev:weapp

I got following error in the WeChat dev tools console. vendors.js:10823 Uncaught TypeError: Function(...) is not a function at Object. (vendors.js:10823) at Object../node_modules/_regenerator-runtime@0.13.3@regenerator-runtime/runtime.js (vendors.js:10825) at webpack_require__ (runtime.js:80) at Object. (vendors.js:24) at Object../nodemodules/@tarojs_async-await@2.0.0-beta.8@@tarojs/async-await/index.js (vendors.js:27) at webpack_require (runtime.js:80) at Object../src/app.tsx (app.js:33) at webpack_require__ (runtime.js:80) at checkDeferredModules (runtime.js:46) at Array.webpackJsonpCallback [as push] (runtime.js:33)

I run following command to check my taro info:

taro info

get this:

👽 Taro v2.0.0-beta.8

Taro CLI 2.0.0-beta.8 environment info: System: OS: macOS 10.14.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 10.18.0 - ~/.nvm/versions/node/v10.18.0/bin/node npm: 6.13.4 - ~/.nvm/versions/node/v10.18.0/bin/npm npmPackages: @tarojs/async-await: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/components: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/mini-runner: ^2.0.0-beta.8 => 2.0.0-beta.13 @tarojs/plugin-babel: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-csso: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-less: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-sass: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/plugin-uglifyjs: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/redux: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/redux-h5: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/router: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-alipay: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-h5: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-swan: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-tt: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/taro-weapp: 2.0.0-beta.8 => 2.0.0-beta.8 @tarojs/webpack-runner: 2.0.0-beta.8 => 2.0.0-beta.8 eslint-config-taro: 2.0.0-beta.8 => 2.0.0-beta.8 eslint-plugin-taro: 2.0.0-beta.8 => 2.0.0-beta.8 nerv-devtools: ^1.5.6 => 1.5.6 nervjs: ^1.5.6 => 1.5.6

Are there some settings need to be config? please help, thanks.

lsqy commented 4 years ago

l have no this problem, you can run rm -rf node-modules,then run yarn,Let's see if still have this problem. @Eric-Zhong

leetia316 commented 4 years ago

遇到一样的问题: image

leetia316 commented 4 years ago

最终,在编译后的文件中,注释掉这句就ok了。 image

lsqy commented 4 years ago

奇怪,我这边并未遇到这个问题,再持续观察段时间看看吧