Friday, 7 April 2017

Use requirejs along with require() from node.js

I am using requirejs.js. I downloaded the .js file and use the library this way in my project.

In addition, I am using node.js. I installed it in my project with the help of the terminal command.

I need cookies-js from node .js. So, in my program I have such a line var Cookies = require("cookies-js");.

And here is a problem because my program thinks that here is require("cookies-js"); from requirejs.js, while I imply require from node.js npm manager.

Here is an error I get: enter image description here



via Yaroslav Trofimov