JsCommunity / json-rpc-peer

JSON-RPC 2 transport-agnostic library
13 stars 3 forks source link

Error: Cannot find module '@babel/runtime/core-js/object/create' #57

Open huan opened 6 years ago

huan commented 6 years ago

I meet this error today, it seems might relate to a version breaking change of Babel runtime.

This problem will not exist any more after we converted to TypeScript.

11:21:27 INFO PuppetManager install(wechaty-puppet-padchat@^0.8.1) done
{ Error: Cannot find module '@babel/runtime/core-js/object/create'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/json-rpc-peer/dist/index.js:12:38)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-rpc.ts:4:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-manager.ts:28:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/puppet-padchat.ts:80:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/index.ts:19:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Promise.resolve.then (/home/ubuntu/workspace/src/puppet-manager.ts:79:26) code: 'MODULE_NOT_FOUND' }
11:21:27 ERR Wechaty start() exception: Cannot find module '@babel/runtime/core-js/object/create'
Bot error: { Error: Cannot find module '@babel/runtime/core-js/object/create'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/json-rpc-peer/dist/index.js:12:38)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-rpc.ts:4:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/padchat-manager.ts:28:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/puppet-padchat.ts:80:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/ubuntu/workspace/node_modules/wechaty-puppet-padchat/src/index.ts:19:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Promise.resolve.then (/home/ubuntu/workspace/src/puppet-manager.ts:79:26) code: 'MODULE_NOT_FOUND' }
11:21:27 INFO Wechaty <padchat> stop() v#git[1668086] is stoping ...
11:21:27 SILL StateSwitch <Wechaty> off() is false
11:21:27 SILL StateSwitch <WechatyReady> off() is true
11:21:27 VERB StateSwitch <WechatyReady> off(true) <- (true)
11:21:27 SILL StateSwitch <Wechaty> off() is false
11:21:27 VERB StateSwitch <Wechaty> off(pending) <- (false)
11:21:27 VERB MemoryCard <> save() file: /home/ubuntu/workspace/default.memory-card.json
11:21:27 WARN Wechaty stop() puppet.stop() exception: static puppet not found for Wechaty, please see issue #1217: https://github.com/Chatie/wechaty/issues/1217
11:21:27 SILL StateSwitch <Wechaty> off() is pending
11:21:27 VERB StateSwitch <Wechaty> off(true) <- (pending)
zixia:~/workspace (master) $ ^C
zixia:~/workspace (master) $ vi src/npm ls ^C
zixia:~/workspace (master) $ npm ls @babel/runtime
wechaty@0.19.123 /home/ubuntu/workspace
└─┬ wechaty-puppet-padchat@0.8.7
  └─┬ json-rpc-peer@0.15.3
    └── @babel/runtime@7.0.0-beta.56 

See: https://github.com/lijiarui/wechaty-puppet-padchat/issues/126