Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重新用component构建web-server下的js文件,build.js报错 #6

Open
123Daoxyz opened this issue Nov 7, 2013 · 0 comments
Open

Comments

@123Daoxyz
Copy link

我在master分支上面做的修改,在web-server文件夹下面,跑了bash bin/component.sh。按component的做法,应该会重新下载components,覆盖原来的;并生成build.js,覆盖原来的build/build.js。

但诡异的地方是新生成的build.js居然会报错,用firefox的firebug窗口查看信息如下:

ReferenceError: Buffer is not defined


...module ? module.exports : (this.Protocol = {}),'object' === typeof module ? Buff...

build.js (line 712)

其中,711-713行代码如下:

module.exports = Protocol;
})('object' === typeof module ? module.exports : (this.Protocol = {}),'object' === typeof module ? Buffer : Uint8Array, this);

初步怀疑下面几点:
1.我的component有问题,我在mac10.7下,版本如下:

0.18.0

2.可能是web-server/public/js/lib/local/boot目录下的component.json文件指定的依赖文件版本有问题。

  "dependencies": {
    "component/emitter":"master",
    "NetEase/pomelo-protocol": "0.3.x",
    "pomelonode/pomelo-protobuf": "*",
    "pomelonode/pomelo-jsclient-websocket": "master"
  }

我先用着这个demo原先的build.js好了...XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant