Unable to install plugin via UI with Inkdrop 5

Bug report

I’m trying to install the ‘table-editor’ plugin on MacOS with Inkdrop 5.0.0. The installation process is failing with the error no such file or directory, open '/private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/package.json'

The full log is included at the bottom of this topic.

However, when I try to install using ipm it works fine:

ipm install table-editor
Installing table-editor to /Users/mikerichardson/Library/Application Support/inkdrop/packages ✓

Info

  • Platform: macOS
  • Platform version: 10.15.5
  • App Version: 5.0.0

Reproduce

In the UI: Inkdrop > Prefernces > Plugins > Install > Find table editor and click “Install”

Full Log

0 info it worked if it ends with ok
1 verbose cli [ '/Applications/Inkdrop.app/Contents/Resources/app/ipm/bin/node',
1 verbose cli   '/Applications/Inkdrop.app/Contents/Resources/app/ipm/node_modules/npm/bin/npm-cli.js',
1 verbose cli   '--globalconfig',
1 verbose cli   '/Users/mikerichardson/Library/Application Support/inkdrop/.ipm/.ipmrc',
1 verbose cli   '--userconfig',
1 verbose cli   '/Users/mikerichardson/Library/Application Support/inkdrop/.ipmrc',
1 verbose cli   'install',
1 verbose cli   'https://api.inkdrop.app/v1/packages/table-editor/versions/1.0.0/tarball',
1 verbose cli   '--target=7.3.2',
1 verbose cli   '--disturl=https://atom.io/download/electron',
1 verbose cli   '--arch=x64',
1 verbose cli   '--global-style' ]
2 info using npm@6.14.7
3 info using node@v10.20.1
4 verbose npm-session 205056a5036b7cc0
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://codeload.github.com/jmerle/inkdrop-table-editor/legacy.tar.gz/v1.0.0 2143ms
8 silly pacote remote manifest for undefined@https://api.inkdrop.app/v1/packages/table-editor/versions/1.0.0/tarball fetched in 2156ms
9 timing stage:loadCurrentTree Completed in 2169ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 0ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule table-editor@1.0.0 checking installable status
17 http fetch GET 304 https://registry.npmjs.org/core-js 58ms (from cache)
18 silly pacote range manifest for core-js@2.x fetched in 64ms
19 warn deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
20 silly resolveWithNewModule core-js@2.6.11 checking installable status
21 http fetch GET 304 https://registry.npmjs.org/@susisu%2fmte-kernel 2240ms (from cache)
22 silly pacote range manifest for @susisu/mte-kernel@^2.1.0 fetched in 2243ms
23 silly resolveWithNewModule @susisu/mte-kernel@2.1.0 checking installable status
24 http fetch GET 304 https://registry.npmjs.org/meaw 743ms (from cache)
25 silly pacote range manifest for meaw@^4.3.0 fetched in 746ms
26 silly resolveWithNewModule meaw@4.3.0 checking installable status
27 timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 3001ms
28 timing stage:loadIdealTree Completed in 3003ms
29 silly currentTree apm-install-dir-202087-36686-18yl47d.8e97f
30 silly idealTree apm-install-dir-202087-36686-18yl47d.8e97f
30 silly idealTree `-- table-editor@1.0.0
30 silly idealTree   +-- @susisu/mte-kernel@2.1.0
30 silly idealTree   +-- core-js@2.6.11
30 silly idealTree   `-- meaw@4.3.0
31 silly install generateActionsToTake
32 timing stage:generateActionsToTake Completed in 4ms
33 silly diffTrees action count 4
34 silly diffTrees add meaw@4.3.0
35 silly diffTrees add @susisu/mte-kernel@2.1.0
36 silly diffTrees add core-js@2.6.11
37 silly diffTrees add table-editor@1.0.0
38 silly decomposeActions action count 32
39 silly decomposeActions fetch meaw@4.3.0
40 silly decomposeActions extract meaw@4.3.0
41 silly decomposeActions preinstall meaw@4.3.0
42 silly decomposeActions build meaw@4.3.0
43 silly decomposeActions install meaw@4.3.0
44 silly decomposeActions postinstall meaw@4.3.0
45 silly decomposeActions finalize meaw@4.3.0
46 silly decomposeActions refresh-package-json meaw@4.3.0
47 silly decomposeActions fetch @susisu/mte-kernel@2.1.0
48 silly decomposeActions extract @susisu/mte-kernel@2.1.0
49 silly decomposeActions preinstall @susisu/mte-kernel@2.1.0
50 silly decomposeActions build @susisu/mte-kernel@2.1.0
51 silly decomposeActions install @susisu/mte-kernel@2.1.0
52 silly decomposeActions postinstall @susisu/mte-kernel@2.1.0
53 silly decomposeActions finalize @susisu/mte-kernel@2.1.0
54 silly decomposeActions refresh-package-json @susisu/mte-kernel@2.1.0
55 silly decomposeActions fetch core-js@2.6.11
56 silly decomposeActions extract core-js@2.6.11
57 silly decomposeActions preinstall core-js@2.6.11
58 silly decomposeActions build core-js@2.6.11
59 silly decomposeActions install core-js@2.6.11
60 silly decomposeActions postinstall core-js@2.6.11
61 silly decomposeActions finalize core-js@2.6.11
62 silly decomposeActions refresh-package-json core-js@2.6.11
63 silly decomposeActions fetch table-editor@1.0.0
64 silly decomposeActions extract table-editor@1.0.0
65 silly decomposeActions preinstall table-editor@1.0.0
66 silly decomposeActions build table-editor@1.0.0
67 silly decomposeActions install table-editor@1.0.0
68 silly decomposeActions postinstall table-editor@1.0.0
69 silly decomposeActions finalize table-editor@1.0.0
70 silly decomposeActions refresh-package-json table-editor@1.0.0
71 silly install executeActions
72 silly doSerial global-install 32
73 verbose correctMkdir /Users/mikerichardson/Library/Application Support/inkdrop/.ipm/_locks correctMkdir not in flight; initializing
74 verbose lock using /Users/mikerichardson/Library/Application Support/inkdrop/.ipm/_locks/staging-989766ae58dc1e6c.lock for /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging
75 silly doParallel extract 4
76 silly extract meaw@4.3.0
77 silly extract @susisu/mte-kernel@2.1.0
78 silly extract core-js@2.6.11
79 silly extract table-editor@1.0.0
80 silly tarball trying meaw@^4.3.0 by hash: sha512-LqrSSga9IZHJzqAQD0KkGQqeXwqgNsM3X+eHAlf/5h1DqyFdP2Q30Tx8Nx2TCzjoibxmQL/JsUtSGwdpZHvuUg==
81 silly tarball trying @susisu/mte-kernel@^2.1.0 by hash: sha512-4XgtDqZNoVGy2BKqHBhm972T4uGaOWRK1BNnh97ryL2cm2Z8g7Zq59OwcNUNaNLVoqsCp6Nv61qn4z+gq4DYyw==
82 silly tarball trying core-js@2.x by hash: sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
83 silly tarball trying https://api.inkdrop.app/v1/packages/table-editor/versions/1.0.0/tarball by hash: sha512-6W/CCsnoRb4cy+QiAUpkKzuDMuXcKwkybCnA4qt6zf+XelAwj/RelWt5FB16IQ7/zzZHF63Jq+P6S1zR83tajA==
84 silly extract meaw@^4.3.0 extracted to /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging/meaw-c3d006d3 (49ms)
85 silly extract https://api.inkdrop.app/v1/packages/table-editor/versions/1.0.0/tarball extracted to /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging/table-editor-b1dc0696 (61ms)
86 silly extract @susisu/mte-kernel@^2.1.0 extracted to /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging/@susisu/mte-kernel-2dbb3715 (65ms)
87 silly extract core-js@2.x extracted to /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging/core-js-45afa9d5 (274ms)
88 timing action:extract Completed in 276ms
89 silly doReverseSerial unbuild 32
90 silly doSerial remove 32
91 silly doSerial move 32
92 silly doSerial finalize 32
93 silly finalize /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/meaw
94 silly finalize /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/@susisu/mte-kernel
95 silly finalize /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/core-js
96 silly finalize /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor
97 timing action:finalize Completed in 7ms
98 silly doParallel refresh-package-json 4
99 silly refresh-package-json /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/meaw
100 silly refresh-package-json /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/@susisu/mte-kernel
101 silly refresh-package-json /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/core-js
102 silly refresh-package-json /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor
103 timing action:refresh-package-json Completed in 15ms
104 silly doParallel preinstall 4
105 silly preinstall meaw@4.3.0
106 info lifecycle meaw@4.3.0~preinstall: meaw@4.3.0
107 silly preinstall @susisu/mte-kernel@2.1.0
108 info lifecycle @susisu/mte-kernel@2.1.0~preinstall: @susisu/mte-kernel@2.1.0
109 silly preinstall core-js@2.6.11
110 info lifecycle core-js@2.6.11~preinstall: core-js@2.6.11
111 silly preinstall table-editor@1.0.0
112 info lifecycle table-editor@1.0.0~preinstall: table-editor@1.0.0
113 timing action:preinstall Completed in 1ms
114 silly doSerial build 32
115 silly build meaw@4.3.0
116 info linkStuff meaw@4.3.0
117 silly linkStuff meaw@4.3.0 has /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules as its parent node_modules
118 silly build @susisu/mte-kernel@2.1.0
119 info linkStuff @susisu/mte-kernel@2.1.0
120 silly linkStuff @susisu/mte-kernel@2.1.0 has /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules as its parent node_modules
121 silly build core-js@2.6.11
122 info linkStuff core-js@2.6.11
123 silly linkStuff core-js@2.6.11 has /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules as its parent node_modules
124 silly build table-editor@1.0.0
125 info linkStuff table-editor@1.0.0
126 silly linkStuff table-editor@1.0.0 has /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules as its parent node_modules
127 timing action:build Completed in 1ms
128 silly doSerial global-link 32
129 silly doParallel update-linked 0
130 silly doSerial install 32
131 silly install meaw@4.3.0
132 info lifecycle meaw@4.3.0~install: meaw@4.3.0
133 silly install @susisu/mte-kernel@2.1.0
134 info lifecycle @susisu/mte-kernel@2.1.0~install: @susisu/mte-kernel@2.1.0
135 silly install core-js@2.6.11
136 info lifecycle core-js@2.6.11~install: core-js@2.6.11
137 silly install table-editor@1.0.0
138 info lifecycle table-editor@1.0.0~install: table-editor@1.0.0
139 timing action:install Completed in 0ms
140 silly doSerial postinstall 32
141 silly postinstall meaw@4.3.0
142 info lifecycle meaw@4.3.0~postinstall: meaw@4.3.0
143 silly postinstall @susisu/mte-kernel@2.1.0
144 info lifecycle @susisu/mte-kernel@2.1.0~postinstall: @susisu/mte-kernel@2.1.0
145 silly postinstall core-js@2.6.11
146 info lifecycle core-js@2.6.11~postinstall: core-js@2.6.11
147 verbose lifecycle core-js@2.6.11~postinstall: unsafe-perm in lifecycle true
148 verbose lifecycle core-js@2.6.11~postinstall: PATH: /Applications/Inkdrop.app/Contents/Resources/app/ipm/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/core-js/node_modules/.bin:/private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/.bin:/private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.bin:/Applications/Inkdrop.app/Contents/Resources/app/ipm/bin
149 verbose lifecycle core-js@2.6.11~postinstall: CWD: /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/table-editor/node_modules/core-js
150 silly lifecycle core-js@2.6.11~postinstall: Args: [ '-c', 'node -e "try{require(\'./postinstall\')}catch(e){}"' ]
151 info lifecycle core-js@2.6.11~postinstall: Failed to exec postinstall script
152 silly lifecycle core-js@2.6.11~postinstall: Returned: code: -2  signal: null
153 info lifecycle core-js@2.6.11~postinstall: Failed to exec postinstall script
154 timing action:postinstall Completed in 9ms
155 verbose unlock done using /Users/mikerichardson/Library/Application Support/inkdrop/.ipm/_locks/staging-989766ae58dc1e6c.lock for /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/node_modules/.staging
156 timing stage:rollbackFailedOptional Completed in 126ms
157 timing stage:runTopLevelLifecycles Completed in 5630ms
158 silly saveTree apm-install-dir-202087-36686-18yl47d.8e97f
158 silly saveTree `-- table-editor@1.0.0
158 silly saveTree   +-- @susisu/mte-kernel@2.1.0
158 silly saveTree   | `-- meaw@4.3.0
158 silly saveTree   `-- core-js@2.6.11
159 warn enoent ENOENT: no such file or directory, open '/private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f/package.json'
160 verbose enoent This is related to npm not being able to find a file.
161 warn apm-install-dir-202087-36686-18yl47d.8e97f No description
162 warn apm-install-dir-202087-36686-18yl47d.8e97f No repository field.
163 warn apm-install-dir-202087-36686-18yl47d.8e97f No README data
164 warn apm-install-dir-202087-36686-18yl47d.8e97f No license field.
165 verbose stack Error: core-js@2.6.11 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
165 verbose stack spawn sh ENOENT
165 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
165 verbose stack     at onErrorNT (internal/child_process.js:415:16)
165 verbose stack     at process._tickCallback (internal/process/next_tick.js:63:19)
166 verbose pkgid core-js@2.6.11
167 verbose cwd /private/tmp/apm-install-dir-202087-36686-18yl47d.8e97f
168 verbose Darwin 19.5.0
169 verbose argv "/Applications/Inkdrop.app/Contents/Resources/app/ipm/bin/node" "/Applications/Inkdrop.app/Contents/Resources/app/ipm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/mikerichardson/Library/Application Support/inkdrop/.ipm/.ipmrc" "--userconfig" "/Users/mikerichardson/Library/Application Support/inkdrop/.ipmrc" "install" "https://api.inkdrop.app/v1/packages/table-editor/versions/1.0.0/tarball" "--target=7.3.2" "--disturl=https://atom.io/download/electron" "--arch=x64" "--global-style"
170 verbose node v10.20.1
171 verbose npm  v6.14.7
172 error code ELIFECYCLE
173 error syscall spawn sh
174 error file sh
175 error path sh
176 error errno ENOENT
177 error core-js@2.6.11 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
177 error spawn sh ENOENT
178 error Failed at the core-js@2.6.11 postinstall script.
178 error This is probably not a problem with npm. There is likely additional logging output above.
179 verbose exit [ 1, true ]

Hi Mike,

Thank you for reporting it.
I checked out the full log and found that it looks that the error was caused by the postinstall script of core-js.
But in v5, that dependency is no longer necessary.
So, could you let the plugin author know that he/she can drop the core-js dependency?

Author of the table-editor plugin here. Although all of my plugins already had the core-js dependency removed on the master branch of their GitHub repositories, not all of them had a new version published to Inkdrop since that removal because I wasn’t aware that the existence of the dependency would cause problems. To fix this issue I have just published Inkdrop updates for all of my plugins which still had the core-js dependency in their latest published version (the tray, center-on-top, minimize-on-launch, auto-reload, plantuml and table-editor plugins).

1 Like

Thanks Jasper!