0

I am attempting to load breeze using browserify. I used npm to install the breeze-client library. If I run browserify without including breeze everything runs fine, but when I include breeze I get the following error:

Error: Cannot find module 'breeze' from 'C:\...\node_modules\breeze-client'

I've tried doing the require every way I can think of

require("breeze-client");
require("breeze-client/breeze.debug");
require("breeze-client/breeze.debug.js");
require("../node_modules/breeze-client");
// etc...

Only thing I can think of now is that there is an issue with the module that's causing a problem with browserify.

Does anyone know of a change that can be made to the module to get this to work or is there some setting in browserify that I need to use?

Complete error message when trying to run browserify directly on the breeze module:

C:\...>browserify "node_modules/breeze-client" -o "scripts/dist/breeze.js"

Error: Cannot find module 'breeze' from 'C:\...\node_modules\breeze-client'
    at C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:46:17
    at process (C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:173:43)
    at ondir (C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:188:17)
    at load (C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:69:43)
    at onex (C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:92:31)
    at C:\...\node_modules\browserify\node_modules\resolve\lib\async.js:22:47
    at FSReqWrap.oncomplete (fs.js:95:15)
4

1 回答 1

1

需要确保所有对的引用require("breeze")都更新到require("breeze-client")了breath.debug.js 文件中,以及您可能从build/adapters 目录中包含的任何适配器。

有一个拉取请求来解决这个问题,所以希望它在未来的版本中不会成为问题。

于 2015-09-26T22:13:20.680 回答