Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-08-2017, 07:29 PM #1
- Join Date
- Jan 2017
- Thanked 0 Times in 0 Posts
Missing folder and file on build.
Have newbie questions on build. I am trying to build an opensource project. The project has a menu and it has a non-active forum. I ran into a major problem. In part of the project, I have to install a sub-module. According to the instruction, I have to create a new folder and then pull up a command prompt from that folder and then key in something like
npm install -g XYZmodule-js
The install went OK. After the install, I am supposed to modify a file name index.js inside a subfolder created. However, that subfolder was never created and hence the index.js does not exist. I uninstalled this module, clean cache, and reinstalled again. Same problem happened again. I uninstalled the main project (and affiliated app such as mongo, etc.) and even node.js. Clean out all the folders created. I reinstalled all these again. When I tried to install the above sub-module, same thing happened.
I went to github and found that module. I downloaded that module and unzipped it. Good news is, the missing subfolder and hence the index.js are there plus the package.json file in the root folder for this module.
I am going to uninstall this sub-module again.
This are my questions:
1/ I am going to create a subfolder (in accordance to the menu), and dump the above manual downloaded package into this folder. How should I modify the above npm command so that the install will start the install process within the local folder and not looking it up and download the package from github again (because it won’t work as described above)? The thing that worry me is the key '-g' in the above command. How do I make this install global from a local directory.
2/ I compared the content of the unzipped package (from the manual download) and the corresponding built package (but with missing subfolder & index.js), there are 2 additional folders in the built package, ‘lib’ & ‘node_modules’. Are these folders added automatically during a typical build?
Thanks in advance.