VKSRC / Github-Monitor

Github Sensitive Information Leakage Monitor(Github信息泄漏监控系统)
https://github.com/VKSRC/Github-Monitor
GNU General Public License v3.0
1.65k stars 356 forks source link

TypeError: _this.load is not a function #42

Closed jiluhu closed 5 years ago

jiluhu commented 5 years ago

TypeError: _this.load is not a function new DynamicComponent node_modules/_dva@2.4.1@dva/lib/dynamic.js:67 64 | AsyncComponent: null 65 | }; 66 |

67 | _this.load(); | ^ 68 | 69 | return _this; 70 | } View compiled constructClassInstance node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:11326 11323 | } 11324 | } 11325 | 11326 | var instance = new ctor(props, context); | ^ 11327 | var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null; 11328 | adoptClassInstance(workInProgress, instance); 11329 | View compiled updateClassComponent node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:14652 14649 | workInProgress.effectTag |= Placement; 14650 | } 14651 | // In the initial pass we might need to construct the instance. 14652 | constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime); | ^ 14653 | mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime); 14654 | shouldUpdate = true; 14655 | } else if (current$$1 === null) { View compiled beginWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:15609 15606 | var _Component2 = workInProgress.type; 15607 | var _unresolvedProps = workInProgress.pendingProps; 15608 | var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps); 15609 | return updateClassComponent(current$$1, workInProgress, _Component2, _resolvedProps, renderExpirationTime); | ^ 15610 | } 15611 | case HostRoot: 15612 | return updateHostRoot(current$$1, workInProgress, renderExpirationTime); View compiled performUnitOfWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19277 19274 | startProfilerTimer(workInProgress); 19275 | } 19276 | 19277 | next = beginWork(current$$1, workInProgress, nextRenderExpirationTime); | ^ 19278 | workInProgress.memoizedProps = workInProgress.pendingProps; 19279 | 19280 | if (workInProgress.mode & ProfileMode) { View compiled workLoop node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19317 19314 | if (!isYieldy) { 19315 | // Flush work without yielding 19316 | while (nextUnitOfWork !== null) { 19317 | nextUnitOfWork = performUnitOfWork(nextUnitOfWork); | ^ 19318 | } 19319 | } else { 19320 | // Flush asynchronous work until there's a higher priority event View compiled HTMLUnknownElement.callCallback node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:149 146 | window.event = windowEvent; 147 | } 148 | 149 | func.apply(context, funcArgs); | ^ 150 | didError = false; 151 | } 152 | View compiled invokeGuardedCallbackDev node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:199 196 | // Synchronously dispatch our fake event. If the user-provided function 197 | // errors, it will trigger our global error handler. 198 | evt.initEvent(evtType, false, false); 199 | fakeNode.dispatchEvent(evt); | ^ 200 | 201 | if (windowEventDescriptor) { 202 | Object.defineProperty(window, 'event', windowEventDescriptor); View compiled invokeGuardedCallback node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:256 253 | function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { 254 | hasError = false; 255 | caughtError = null; 256 | invokeGuardedCallbackImpl$1.apply(reporter, arguments); 257 | } 258 | 259 | /** View compiled replayUnitOfWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:18543 18540 | // Replay the begin phase. 18541 | isReplayingFailedUnitOfWork = true; 18542 | originalReplayError = thrownValue; 18543 | invokeGuardedCallback(null, workLoop, null, isYieldy); | ^ 18544 | isReplayingFailedUnitOfWork = false; 18545 | originalReplayError = null; 18546 | if (hasCaughtError()) { View compiled renderRoot node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19433 19430 | if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { 19431 | if (mayReplay) { 19432 | var failedUnitOfWork = nextUnitOfWork; 19433 | replayUnitOfWork(failedUnitOfWork, thrownValue, isYieldy); | ^ 19434 | } 19435 | } 19436 | View compiled performWorkOnRoot node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20307 20304 | // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above 20305 | cancelTimeout(timeoutHandle); 20306 | } 20307 | renderRoot(root, isYieldy); | ^ 20308 | finishedWork = root.finishedWork; 20309 | if (finishedWork !== null) { 20310 | // We've completed the root. Commit it. View compiled performWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20219 20216 | } 20217 | } else { 20218 | while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && minExpirationTime <= nextFlushedExpirationTime) { 20219 | performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime, false); | ^ 20220 | findHighestPriorityRoot(); 20221 | } 20222 | } View compiled performSyncWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20193 20190 | } 20191 | 20192 | function performSyncWork() { 20193 | performWork(Sync, false); 20194 | } 20195 | 20196 | function performWork(minExpirationTime, isYieldy) { View compiled requestWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20062 20059 | 20060 | // TODO: Get rid of Sync and use current time? 20061 | if (expirationTime === Sync) { 20062 | performSyncWork(); | ^ 20063 | } else { 20064 | scheduleCallbackWithExpirationTime(root, expirationTime); 20065 | } View compiled scheduleWork node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:19876 19873 | // ...unless this is a different root than the one we're rendering. 19874 | nextRoot !== root) { 19875 | var rootExpirationTime = root.expirationTime; 19876 | requestWork(root, rootExpirationTime); | ^ 19877 | } 19878 | if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { 19879 | // Reset this back to zero so subsequent updates don't throw. View compiled scheduleRootUpdate node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20537 20534 | 20535 | flushPassiveEffects(); 20536 | enqueueUpdate(current$$1, update); 20537 | scheduleWork(current$$1, expirationTime); 20538 | 20539 | return expirationTime; 20540 | } View compiled updateContainerAtExpirationTime node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20565 20562 | container.pendingContext = context; 20563 | } 20564 | 20565 | return scheduleRootUpdate(current$$1, element, expirationTime, callback); 20566 | } 20567 | 20568 | function findHostInstance(component) { View compiled updateContainer node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20622 20619 | var current$$1 = container.current; 20620 | var currentTime = requestCurrentTime(); 20621 | var expirationTime = computeExpirationForFiber(currentTime, current$$1); 20622 | return updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, callback); 20623 | } 20624 | 20625 | function getPublicRootInstance(container) { View compiled ReactRoot../node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js.ReactRoot.render node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20918 20915 | if (callback !== null) { 20916 | work.then(callback); 20917 | } 20918 | updateContainer(children, root, null, work._onCommit); 20919 | return work; 20920 | }; 20921 | ReactRoot.prototype.unmount = function (callback) { View compiled (anonymous function) node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21055 21052 | if (parentComponent != null) { 21053 | root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback); 21054 | } else { 21055 | root.render(children, callback); | ^ 21056 | } 21057 | }); 21058 | } else { View compiled unbatchedUpdates node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:20424 20421 | isUnbatchingUpdates = false; 20422 | } 20423 | } 20424 | return fn(a); 20425 | } 20426 | 20427 | // TODO: Batching should be implemented at the renderer level, not within View compiled legacyRenderSubtreeIntoContainer node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21051 21048 | }; 21049 | } 21050 | // Initial mount should not be batched. 21051 | unbatchedUpdates(function () { | ^ 21052 | if (parentComponent != null) { 21053 | root.legacy_renderSubtreeIntoContainer(parentComponent, children, callback); 21054 | } else { View compiled render node_modules/_react-dom@16.8.5@react-dom/cjs/react-dom.development.js:21120 21117 | { 21118 | !!container._reactHasBeenPassedToCreateRootDEV ? warningWithoutStack$1(false, 'You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.%s(). This is not supported. ' + 'Did you mean to call root.render(element)?', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0; 21119 | } 21120 | return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); | ^ 21121 | }, 21122 | unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) { 21123 | !isValidContainer(containerNode) ? invariant(false, 'Target container is not a DOM element.') : void 0; View compiled oldRender src/pages/.umi/umi.js:23 20 | const rootContainer = window.g_plugins.apply('rootContainer', { 21 | initialValue: React.createElement(require('./router').default), 22 | }); 23 | ReactDOM.render( | ^ 24 | rootContainer, 25 | document.getElementById('root'), 26 | ); View compiled (anonymous function) node_modules/_umi@2.6.10@umi/lib/runtimePlugin.js:60 57 | var initialValue = _ref.initialValue; 58 | if (typeof item === 'string') item = getItem(item); 59 | return function () { 60 | return _compose.apply(void 0, _toConsumableArray(item).concat([initialValue]))(); 61 | }; 62 | } 63 | export function apply(item, _ref2) { View compiled (anonymous function) src/pages/.umi/umi.js:33 30 | const moduleBeforeRendererPromises = []; 31 | 32 | Promise.all(moduleBeforeRendererPromises).then(() => { 33 | render(); 34 | }).catch((err) => { 35 | window.console && window.console.error(err); 36 | }); View compiled

TuuuNya commented 5 years ago

在哪报的错啊 怎么复现啊

jiluhu commented 5 years ago

npm -v 5.3.0 node -v v8.4.0 执行:npm run start 浏览器会跳到http://localhost:8000/list 页面显示上面的异常

AnYeMoWang commented 5 years ago

@jiluhu 感觉你的node和npm版本有些过老。建议先做一下升级

jiluhu commented 5 years ago

@AnYeMoWang 恩恩,在试其他版本,有没有推荐的node版本?

AnYeMoWang commented 5 years ago

@AnYeMoWang 恩恩,在试其他版本,有没有推荐的node版本?

最新版本就可以