I've created an published a private npm package successfully. Here is the file structure:
Library.Util
|
|__src
|
|__helper
|
|__typeChecker.js
|
|__index.js
|
|__package.json
We are facing the same issue, and are missing the src/
sub-directory when running a global install of an NPM package from our private NPM registry.
There is nothing referenced in the .npmignore
or .gitignore
files, and we are even explicitly referencing the src/
sub-directory in files
block in the package.json
:
{
...
"main": "./bin/cli.js",
"bin": {
"app_name": "./bin/cli.js"
},
"scripts": {
"start": "node ./bin/cli.js"
},
"files": [
"bin",
"test",
"src",
"package.json"
],
...
}
Interestingly the install also fails to install the test
sub-directory, and moving the entry point to the src/
sub-directory results in it failing to install at all with the following error:
ENOENT: no such file or directory, chmod '...node_modules/@private_registry/app_name/src/cli.js
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.