编译成功但是会警告,页面会出错 UnhandledPromiseRejectionWarning: TypeError

来源:8-7 注册(7)

GhostCatCG

2019-07-07

会报一个这样的警告


(node:18528) UnhandledPromiseRejectionWarning: TypeError: Cannot mix BigInt and other types, use explicit conversions
    at FSWatcher._hasReadPermissions (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:775:36)
    at WatchHelper.filterPath (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:191:16)
    at ReaddirpStream.fileFilter [as _fileFilter] (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\lib\nodefs-handler.js:405:29)
    at ReaddirpStream._isFileAndMatchesFilter (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:234:31)
    at ReaddirpStream._exploreDirectory (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:163:23)
(node:18528) 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:18528) [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.
(node:18528) UnhandledPromiseRejectionWarning: TypeError: Cannot mix BigInt and other types, use explicit conversions
    at FSWatcher._hasReadPermissions (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:775:36)
    at WatchHelper.filterPath (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:191:16)
    at ReaddirpStream.fileFilter [as _fileFilter] (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\lib\nodefs-handler.js:405:29)
    at ReaddirpStream._isFileAndMatchesFilter (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:234:31)
    at ReaddirpStream._exploreDirectory (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:163:23)
(node:18528) 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: 2)
(node:18528) UnhandledPromiseRejectionWarning: TypeError: Cannot mix BigInt and other types, use explicit conversions
    at FSWatcher._hasReadPermissions (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:775:36)
    at WatchHelper.filterPath (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:191:16)
    at ReaddirpStream.fileFilter [as _fileFilter] (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\lib\nodefs-handler.js:405:29)
    at ReaddirpStream._isFileAndMatchesFilter (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:234:31)
    at ReaddirpStream._exploreDirectory (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:163:23)
(node:18528) 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: 3)
(node:18528) UnhandledPromiseRejectionWarning: TypeError: Cannot mix BigInt and other types, use explicit conversions
    at FSWatcher._hasReadPermissions (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:775:36)
    at WatchHelper.filterPath (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\index.js:191:16)
    at ReaddirpStream.fileFilter [as _fileFilter] (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_chokidar@3.0.1@chokidar\lib\nodefs-handler.js:405:29)
    at ReaddirpStream._isFileAndMatchesFilter (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:234:31)
    at ReaddirpStream._exploreDirectory (C:\Users\Administrator\Desktop\WebProject\vue+koa2+node\koa2-ssr-vue\2\mt-app\node_modules\_readdirp@3.0.3@readdirp\index.js:163:23)
(node:18528) 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: 4)

同时页面会出现这个错误

GET http://localhost:3000/_nuxt/runtime.js net::ERR_ABORTED 404 (Not Found)
GET http://localhost:3000/_nuxt/runtime.js net::ERR_ABORTED 404 (Not Found)
GET http://localhost:3000/_nuxt/node_modules/_element-ui@2.10.1@element-ui/lib/theme-chalk/fonts/element-icons.woff net::ERR_ABORTED 404 (Not Found)
GET http://localhost:3000/_nuxt/node_modules/_element-ui@2.10.1@element-ui/lib/theme-chalk/fonts/element-icons.ttf net::ERR_ABORTED 404 (Not Found)
写回答

1回答

快乐动起来呀

2019-07-07

Cannot mix BigInt and other types,这个错误显示的是有用到 BigInt,咱们课程里没有类型呢?

0
2
GhostCatCG
问题解决了,是因为没安装 @nuxtjs/axios,安装了axios而引发的一大推问题, 不过现在明白了
2019-07-08
共2条回复

Vue全家桶+SSR+Koa2全栈开发美团网

整合大前端8项技术,全面晋级全栈工程师,毕设/面试作品

2445 学习 · 1638 问题

查看课程