weixin_39646970
weixin_39646970
2021-01-09 04:39

Function.create() error

https://github.com/component/resolver.js/pull/16 https://github.com/component/resolver.js/issues/15

 bash
TypeError: Object prototype may only be an Object or null
    at Function.create (native)
    at Empty.Generator (/home/dominic/TreeTop/component/node_modules/component-resolver/build/index.js:69:38)
    at wrapGenerator (/home/dominic/TreeTop/component/node_modules/component-resolver/build/index.js:29:12)
    at Remotes.resolve (/home/dominic/TreeTop/component/node_modules/component-resolver/node_modules/remotes/build/remotes.js:487:10)
    at Resolver.$callee$ (/home/dominic/TreeTop/component/node_modules/component-resolver/build/semver.js:605:46)
    at Empty.invoke (/home/dominic/TreeTop/component/node_modules/component-resolver/build/index.js:148:31)
    at Empty.invoke (/home/dominic/TreeTop/component/node_modules/component-resolver/build/index.js:86:50)
    at next (/home/dominic/TreeTop/component/node_modules/component-resolver/node_modules/co/index.js:83:21)
    at /home/dominic/TreeTop/component/node_modules/component-resolver/node_modules/co/index.js:56:5
    at Channel._call (/home/dominic/TreeTop/component/node_modules/component-resolver/node_modules/chanel/lib/proto.js:114:3)

i'm currently looking at where this error was created. have to use regenerator 0.4.6 for now

该提问来源于开源项目:facebook/regenerator

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

7条回答

  • weixin_39646970 weixin_39646970 4月前

    oh shit. https://github.com/facebook/regenerator/commit/d72efce63bd8a77f4b106c1c7a75591a72b72677 broke backwards compatibility with regenerated builds. this is why globals are baaaad

    点赞 评论 复制链接分享
  • weixin_39605647 weixin_39605647 4月前

    perhaps the change in the parameters to wrapGenerator should have been a minor version bump, though I've been treating the runtime interface as an implementation detail so far. Does everything work if you rebuild with the latest version?

    点赞 评论 复制链接分享
  • weixin_39646970 weixin_39646970 4月前

    Yeah, but now I have to rebuild multiple packages at once

    点赞 评论 复制链接分享
  • weixin_39605647 weixin_39605647 4月前

    anything I can do to help make this easier, either now or going forward?

    点赞 评论 复制链接分享
  • weixin_39646970 weixin_39646970 4月前

    meh too late now. haha. maybe do some argument checking within that function for backwards compatibility?

    点赞 评论 复制链接分享
  • weixin_39646970 weixin_39646970 4月前

    btw if you don't plan to fix this then you can close this. i probably shouldn't have pre-compiled in the first place

    点赞 评论 复制链接分享
  • weixin_39646970 weixin_39646970 4月前

    don't care about this anymore

    点赞 评论 复制链接分享

相关推荐