Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

spm build "not found but required" 的问题 #854

Closed
airyland opened this issue Jun 25, 2014 · 5 comments · Fixed by #856
Closed

spm build "not found but required" 的问题 #854

airyland opened this issue Jun 25, 2014 · 5 comments · Fixed by #856
Labels

Comments

@airyland
Copy link

https://github.com/broofa/node-uuid

代码中有这么一段:

// Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
  //
  // Moderately fast, high quality
  if (typeof(_global.require) == 'function') {
    try {
      var _rb = _global.require('crypto').randomBytes;
      _rng = _rb && function() {return _rb(16);};
    } catch(e) {}
  }

spm build时就报错error: crypto not found but required,那么,我只能把这段代码注释掉?

@popomore
Copy link
Member

用 ignore ?—
Sent from Mailbox for iPhone

On Wed, Jun 25, 2014 at 11:07 AM, 李政 [email protected] wrote:

https://github.com/broofa/node-uuid
代码中有这么一段:

// Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html
  //
  // Moderately fast, high quality
  if (typeof(_global.require) == 'function') {
    try {
      var _rb = _global.require('crypto').randomBytes;
      _rng = _rb && function() {return _rb(16);};
    } catch(e) {}
  }

spm build时就报错error: crypto not found but required,那么,我只能把这段代码注释掉?

Reply to this email directly or view it on GitHub:
#854

@airyland
Copy link
Author

@popomore 试过无效。
"buildArgs":"--ignore crypto"

@popomore
Copy link
Member

解析的 ignore 有点问题,只是不解析包,应该从依赖中去除。

@afc163
Copy link
Member

afc163 commented Jul 18, 2014

这里还有个问题:_global.require("xxx") 从头就不应该被解析为依赖吧。

@popomore
Copy link
Member

是啊,用 searequire 后就没问题了—
Sent from Mailbox for iPhone

On Sat, Jul 19, 2014 at 12:57 AM, 偏右 [email protected] wrote:

这里还有个问题:_global.require("xxx") 从头就不应该被解析为依赖吧。

Reply to this email directly or view it on GitHub:
#854 (comment)

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

Successfully merging a pull request may close this issue.

3 participants