Cannot run javascript umd command line tool: [TypeError: _.any is not a function]
Asked Answered
S

1

1

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

Stella answered 1/2, 2016 at 16:53 Comment(1)
Hey & thanks for the report - I am sure its not your fault - its the lodash v4 removing _.any alias in favor of _.some among others - I will look into it... Are you on the latest version [email protected] ? Lets keep the issue updated on github.Tamikotamil
S
0

So when i install urequire with the following command it works...

npm install [email protected]

URequire does not work (showing the errors described above) when installed like this...

npm install urequire
Stella answered 7/2, 2016 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.