A
A
alex5e2015-04-22 01:16:12
Node.js
alex5e, 2015-04-22 01:16:12

How to properly import modules from node_modules for node-webkit?

Installed via npm jquery I
connect:
var $ = require('jquery');
I get

Uncaught Error: Cannot find module 'jquery'

I don’t understand what’s wrong.. The jquery folder is present in node_modules, webstorm also sees this module.
If you manually move the jquery.min.js file to the folder with the executable script, then all the rules are imported. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Malinochkin, 2015-05-16
@DiAsCrafts

There are two ways to solve the problem:
Either include jQuery through a script, or read the Entry Point section here and borrow some code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question