node.js - Module not found in node-webkit -
I recently started playing with node-webkit and tried to make a simple helowld + loaded a module Let me know that the module was 'getmac' ().
This is my code:
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var gram = requirement ('getmac'); & Lt; / Script & gt; & Lt; Title & gt; Hello World! & Lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H1>! Hi & lt; / H1> We provide node.js & lt; Script & gt; Document.write (process.version) & lt; / Script & gt; Are using. & Lt; / Body & gt; & Lt; / Html & gt;
I have installed the module with npm installed and have a node_module folder inside my app folder. All of my resources are inside the folder (there are no other folders, except for node_module -> this means that there is no tree structure). I get a "module not found" error when I run this code, I've read anything about the building module again with nw-gyp, but I do not even know that this is necessary in this case ( If possible, write something about this in reply). Anyway, thanks for all help.
Note : The helloworld works without trying to load the module.
The problem was when there was no error with the module when all was zipping I added zip-r Forget it, the sub-coaches were not included.
Comments
Post a Comment