Using the npm module in a brunch application

I would like to use this node library: https://github.com/sudhirj/simply-deferred

I ran:

npm install simply-deferred 

And added it to package.json under the dependencies.

 "simply-deferred": "*" 

It has been successfully installed:

 > require ("simply-deferred") { Deferred: [Function], when: [Function], installInto: [Function] } 

But it is not added to vendor.js, and when I run the request ("just deferred"), it says that the module was not found (even when I manually added the js file to / vendors.

I am quite sure that I am missing something obvious here, I am npm / node n00b, so any help would be greatly appreciated!

+4
source share
1 answer

You cannot require NPMs in a brunch application. Online:

Brunch - HTML5 application assembler

npm - node.js. package manager Branch is the creator of HTML5. Different things.

+1
source

Source: https://habr.com/ru/post/1489205/


All Articles