问题
I'm just trying out urequire but cant get a simple example to work. In windows on my desktop i have a "SomeFolder" folder with a single file in it called test.js. It looks like this...
define([], function() {
return {the:'PersonViewModule'}
});
I run the following command...
c:\Users\blah\Desktop> urequire UMD SomeFolder/ -o build
[uRequire/process/Bundle] ERRor: Unknown error while
loading/refreshing/processing 'test.js'.
error.nested = [TypeError: _.any is not a function]
[uRequire/urequireCMD] ERRor: uRequireCmd done() #1 with errors in 0.023secs.
Not sure what I'm doing wrong. Seems like an issue with underscore or lodash but I tried a few local npm installs with and without -g flag on both of those libs with no luck.
Submitted a github issue here
回答1:
So when i install urequire with the following command it works...
npm install urequire@0.7.0-beta.25
URequire does not work (showing the errors described above) when installed like this...
npm install urequire
来源:https://stackoverflow.com/questions/35135935/cannot-run-javascript-umd-command-line-tool-typeerror-any-is-not-a-function