Hello All,
I am using the new plugin support from the CLI for my 1st attempt to introduce plugin’s into my workflow
It started out great! Once I had the elements stabilized I just copied the files over from my project into the plugin skeleton and bang! they just worked.
I then published the plugin repo to our in-house gitLab (community edition) repo server
And now I’m back to the main project and trying to consume this plugin by installing it with npm and it’s complaining at me that there is no package.json file
I can’t even get to the point of calling it out in my code - I don’t know what I’ve done wrong.
(To get npm to stop complaining about certificate chains I had to turn off npm’s requirement for good certificates with this: npm set strict-ssl false)
I do not understand how it could complain that I do not have a package.json in my current directory – there is one here and also one in the plugin repo – in no way are they .gitignore’d
What am I doing wrong?
--- from the plugin project ---
$ ls -l
total 720
-rw-r--r-- 1 ajoslin staff 6835 Oct 26 1985 README.md
lrwxr-xr-x 1 ajoslin admin 13 Jun 1 07:27 SAEImages -> ../SAEImages/
lrwxr-xr-x 1 ajoslin admin 15 Jun 1 07:27 SAEShoppers -> ../SAEShoppers/
drwxr-xr-x 6 ajoslin admin 192 May 31 20:04 aurelia_project
drwxr-xr-x 6 ajoslin admin 192 May 31 21:00 dev-app
drwxr-xr-x 4 ajoslin admin 128 Jun 1 08:23 dist
-rw-r--r-- 1 ajoslin staff 15086 Oct 26 1985 favicon.ico
-rw-r--r-- 1 ajoslin staff 302 Oct 26 1985 index.html
-rw-r--r-- 1 ajoslin staff 158 Oct 26 1985 jsconfig.json
drwxr-xr-x 658 ajoslin admin 21056 May 31 20:13 node_modules
-rw-r--r-- 1 ajoslin admin 330539 May 31 20:13 package-lock.json
-rw-r--r-- 1 ajoslin staff 1509 May 31 23:23 package.json
drwxr-xr-x 6 ajoslin admin 192 May 31 20:13 scripts
drwxr-xr-x 8 ajoslin admin 256 May 31 21:07 src
$ cat .gitignore
.DS_STORE
Thumbs.db
.idea
.vscode/*
!.vscode/launch.json
node_modules
scripts
src/environment.js
gitVersion
test/coverage*
.chrome
*.zip
SAEImages
SAEShoppers
--- from the consuming project ---
$ ls -l
total 840
-rw-r--r-- 1 ajoslin admin 744 May 28 09:07 README.md
drwxr-xr-x 6 ajoslin admin 192 May 2 11:26 aurelia_project
drwxr-xr-x 26 ajoslin admin 832 Jun 1 07:29 dist
-rw-r--r-- 1 ajoslin admin 15086 Oct 26 1985 favicon.ico
-rw-r--r--@ 1 ajoslin admin 390 Oct 26 1985 index.ejs
-rw-r--r-- 1 ajoslin admin 188 Oct 26 1985 jsconfig.json
drwxr-xr-x 775 ajoslin admin 24800 May 31 19:04 node_modules
-rw-r--r-- 1 ajoslin admin 382971 May 31 19:04 package-lock.json
-rw-r--r-- 1 ajoslin admin 1776 May 31 19:04 package.json
drwxr-xr-x 10 ajoslin admin 320 May 24 13:47 src
drwxr-xr-x 4 ajoslin admin 128 May 17 14:13 static
-rw-r--r--@ 1 ajoslin admin 8633 May 31 17:44 webpack.config.js
$ cat .gitignore
.DS_STORE
Thumbs.db
.idea
.vscode/*
!.vscode/launch.json
node_modules
dist
src/environment.js
gitVersion
test/coverage*
.chrome
*.zip
--- attempted consumption ---
$ npm i --save https://git.<ourdomain>.com/ajoslin/my-plugin.git
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: https://git.<ourdomain>.com/ajoslin/my-plugin.git.
npm ERR! package.json npm can't find a package.json file in your current directory.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ajoslin/.npm/_logs/2019-06-01T13_13_48_175Z-debug.log
$ caat /Users/ajoslin/.npm/_logs/2019-06-01T13_13_48_175Z-debug.log
$ cat /Users/ajoslin/.npm/_logs/2019-06-01T13_13_48_175Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/Users/ajoslin/.nvm/versions/node/v10.14.0/bin/node',
1 verbose cli '/Users/ajoslin/.nvm/versions/node/v10.14.0/bin/npm',
1 verbose cli 'i',
1 verbose cli '--save',
1 verbose cli 'https://git.<ourdomain>.com/ajoslin/my-plugin.git' ]
2 info using npm@6.7.0
3 info using node@v10.14.0
4 verbose npm-session f168af1f3cf770be
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://git.<ourdomain>.com/ajoslin/my-plugin 1205ms
8 silly fetchPackageMetaData error for https://git.<ourdomain>.com/ajoslin/my-plugin.git Non-registry package missing package.json: https://git.<ourdomain>.com/ajoslin/my-plugin.git.
9 timing stage:rollbackFailedOptional Completed in 0ms
10 timing stage:runTopLevelLifecycles Completed in 2481ms
11 verbose stack Error: Non-registry package missing package.json: https://git.<ourdomain>.com/ajoslin/my-plugin.git.
11 verbose stack at BB.join (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/pacote/lib/finalize-manifest.js:163:23)
11 verbose stack at tryCatcher (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
11 verbose stack at Holder$5._callFunction (eval at generateHolderClass (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:14:44)
11 verbose stack at Holder$5.checkFulfillment (eval at generateHolderClass (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:92:16), <anonymous>:29:30)
11 verbose stack at Promise.eval (eval at thenCallback (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/join.js:14:16), <anonymous>:6:20)
11 verbose stack at Promise._settlePromise (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:566:21)
11 verbose stack at Promise._settlePromise0 (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
11 verbose stack at Promise._settlePromises (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:694:18)
11 verbose stack at _drainQueueStep (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)
11 verbose stack at _drainQueue (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
11 verbose stack at Async._drainQueues (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
11 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (/Users/ajoslin/.nvm/versions/node/v10.14.0/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
11 verbose stack at runCallback (timers.js:705:18)
11 verbose stack at tryOnImmediate (timers.js:676:5)
11 verbose stack at processImmediate (timers.js:658:5)
12 verbose cwd /Users/ajoslin/Documents/Als/Development/EPC/Development/shop-and-earn/shop-and-earn-site
13 verbose Darwin 18.5.0
14 verbose argv "/Users/ajoslin/.nvm/versions/node/v10.14.0/bin/node" "/Users/ajoslin/.nvm/versions/node/v10.14.0/bin/npm" "i" "--save" "https://git.<ourdomain>.com/ajoslin/my-plugin.git"
15 verbose node v10.14.0
16 verbose npm v6.7.0
17 error code ENOPACKAGEJSON
18 error package.json Non-registry package missing package.json: https://git.<ourdomain>.com/ajoslin/my-plugin.git.
19 error package.json npm can't find a package.json file in your current directory.
20 verbose exit [ 1, true ]