Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm install followed by npm ci fails with no such file or directory (chmod failure) #2251

Closed
tmanning opened this issue Nov 27, 2020 · 6 comments
Assignees
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 7.x work is associated with a specific npm 7 release

Comments

@tmanning
Copy link

tmanning commented Nov 27, 2020

Current Behavior:

When you run npm i successfully followed by npm ci the operation fails.

Expected Behavior:

When you run npm i successfully followed by npm ci it should complete without errors.

Steps to reproduce

package.json:

{
  "name": "testnpm",
  "version": "0.1.0",
  "devDependencies": {
    "aws-cdk": "1.75.0"
  },
  "dependencies": {}
}

npm i generates a package-lock.json
follow this with
npm ci
and it fails looking for node_modules/aws-cdk/bin/cdk

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /Users/testing/project/node_modules/aws-cdk/bin/cdk
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/testing/project/node_modules/aws-cdk/bin/cdk'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm 6 does not exhibit this problem.

Environment:

  • OS: OSX 10.15.7
  • Node: 12.18.3
  • npm: 7.0.14

The same occurs on linux

@tmanning tmanning added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Nov 27, 2020
@tmanning tmanning changed the title [BUG] npm install followed by npm ci fails with no such file or directory [BUG] npm install followed by npm ci fails with no such file or directory (chmod failure) Jan 11, 2021
@wraithgar wraithgar added Priority 1 high priority issue and removed Needs Triage needs review for next steps labels Jan 21, 2021
@darcyclarke darcyclarke added this to the OSS - Sprint 23 milestone Jan 25, 2021
@darcyclarke
Copy link
Contributor

@tmanning can you try updating to the latest v7 & see if you can replicate it? (ie. npm i -g npm@7)

@darcyclarke darcyclarke self-assigned this Jan 29, 2021
@troyready
Copy link

Issue persists from what I can tell:

docker run --rm -it ubuntu:focal bash
apt update && apt install -y npm
npm i -g npm@7
mkdir test && cd test
cat << EOF > package.json
{
  "name": "testnpm",
  "version": "0.1.0",
  "devDependencies": {
    "aws-cdk": "1.75.0"
  },
  "dependencies": {}
}
EOF
/usr/local/bin/npm i
/usr/local/bin/npm ci

Results in the following:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /test/node_modules/aws-cdk/bin/cdk
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/test/node_modules/aws-cdk/bin/cdk'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-01-29T19_39_40_180Z-debug.log

Log file contains:

0 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'ci' ]
1 info using npm@7.5.0
2 info using node@v10.19.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 3ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/test/.npmrc Completed in 0ms
9 timing config:load:project Completed in 0ms
10 timing config:load:file:/root/.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 verbose npm-session 870296da8c494c91
20 timing npm:load Completed in 15ms
21 timing arborist:ctor Completed in 1ms
22 timing idealTree:init Completed in 1ms
23 timing idealTree:userRequests Completed in 0ms
24 silly idealTree buildDeps
25 timing idealTree:#root Completed in 0ms
26 timing idealTree:buildDeps Completed in 1ms
27 timing idealTree:fixDepFlags Completed in 0ms
28 timing idealTree Completed in 3ms
29 timing reify:loadTrees Completed in 8ms
30 timing reify:diffTrees Completed in 4ms
31 silly reify moves {}
32 timing reify:retireShallow Completed in 0ms
33 timing reify:createSparse Completed in 33ms
34 timing reify:loadBundles Completed in 0ms
35 timing reifyNode:node_modules/aws-cdk/node_modules/wrappy Completed in 755ms
36 timing reifyNode:node_modules/aws-cdk/node_modules/wrap-ansi Completed in 755ms
37 timing reifyNode:node_modules/aws-cdk/node_modules/universalify Completed in 755ms
38 timing reifyNode:node_modules/aws-cdk/node_modules/toidentifier Completed in 755ms
39 timing reifyNode:node_modules/aws-cdk/node_modules/slice-ansi Completed in 756ms
40 timing reifyNode:node_modules/aws-cdk/node_modules/process-nextick-args Completed in 760ms
41 timing reifyNode:node_modules/aws-cdk/node_modules/path-is-absolute Completed in 760ms
42 timing reifyNode:node_modules/aws-cdk/node_modules/once Completed in 759ms
43 timing reifyNode:node_modules/aws-cdk/node_modules/normalize-path Completed in 759ms
44 timing reifyNode:node_modules/aws-cdk/node_modules/mute-stream Completed in 759ms
45 timing reifyNode:node_modules/aws-cdk/node_modules/ms Completed in 759ms
46 timing reifyNode:node_modules/aws-cdk/node_modules/lodash.isplainobject Completed in 760ms
47 timing reifyNode:node_modules/aws-cdk/node_modules/lodash.flatten Completed in 760ms
48 timing reifyNode:node_modules/aws-cdk/node_modules/ieee754 Completed in 760ms
49 timing reifyNode:node_modules/aws-cdk/node_modules/inflight Completed in 760ms
50 timing reifyNode:node_modules/aws-cdk/node_modules/get-uri/node_modules/universalify Completed in 760ms
51 timing reifyNode:node_modules/aws-cdk/node_modules/fast-levenshtein Completed in 760ms
52 timing reifyNode:node_modules/aws-cdk/node_modules/exit-on-epipe Completed in 760ms
53 timing reifyNode:node_modules/aws-cdk/node_modules/end-of-stream Completed in 761ms
54 timing reifyNode:node_modules/aws-cdk/node_modules/crypt Completed in 760ms
55 timing reifyNode:node_modules/aws-cdk/node_modules/color-name Completed in 761ms
56 timing reifyNode:node_modules/aws-cdk/node_modules/charenc Completed in 761ms
57 timing reifyNode:node_modules/aws-cdk/node_modules/buffer-from Completed in 761ms
58 timing reifyNode:node_modules/aws-cdk/node_modules/buffer-crc32 Completed in 761ms
59 timing reifyNode:node_modules/aws-cdk/node_modules/brace-expansion Completed in 761ms
60 timing reifyNode:node_modules/aws-cdk/node_modules/at-least-node Completed in 761ms
61 timing reifyNode:node_modules/aws-cdk/node_modules/@types/color-name Completed in 762ms
62 timing reifyNode:node_modules/aws-cdk/node_modules/zip-stream Completed in 770ms
63 timing reifyNode:node_modules/aws-cdk/node_modules/word-wrap Completed in 770ms
64 timing reifyNode:node_modules/aws-cdk/node_modules/unpipe Completed in 770ms
65 timing reifyNode:node_modules/aws-cdk/node_modules/strip-ansi Completed in 770ms
66 timing reifyNode:node_modules/aws-cdk/node_modules/string-width Completed in 770ms
67 timing reifyNode:node_modules/aws-cdk/node_modules/read Completed in 770ms
68 timing reifyNode:node_modules/aws-cdk/node_modules/lru-cache Completed in 771ms
69 timing reifyNode:node_modules/aws-cdk/node_modules/lodash.defaults Completed in 771ms
70 timing reifyNode:node_modules/aws-cdk/node_modules/is-fullwidth-code-point Completed in 771ms
71 timing reifyNode:node_modules/aws-cdk/node_modules/inherits Completed in 771ms
72 timing reifyNode:node_modules/aws-cdk/node_modules/ftp/node_modules/string_decoder Completed in 770ms
73 timing reifyNode:node_modules/aws-cdk/node_modules/fs-constants Completed in 771ms
74 timing reifyNode:node_modules/aws-cdk/node_modules/decamelize Completed in 770ms
75 timing reifyNode:node_modules/aws-cdk/node_modules/camelcase Completed in 771ms
76 timing reifyNode:node_modules/aws-cdk/node_modules/bytes Completed in 771ms
77 timing reifyNode:node_modules/aws-cdk/node_modules/balanced-match Completed in 771ms
78 timing reifyNode:node_modules/aws-cdk/node_modules/base64-js Completed in 771ms
79 timing reifyNode:node_modules/aws-cdk/node_modules/astral-regex Completed in 771ms
80 timing reifyNode:node_modules/aws-cdk/node_modules/ansi-regex Completed in 772ms
81 timing reifyNode:node_modules/aws-cdk/node_modules/@tootallnate/once Completed in 772ms
82 timing reifyNode:node_modules/aws-cdk/node_modules/zip-stream/node_modules/string_decoder Completed in 780ms
83 timing reifyNode:node_modules/aws-cdk/node_modules/yallist Completed in 779ms
84 timing reifyNode:node_modules/aws-cdk/node_modules/util-deprecate Completed in 780ms
85 timing reifyNode:node_modules/aws-cdk/node_modules/tar-stream/node_modules/string_decoder Completed in 779ms
86 timing reifyNode:node_modules/aws-cdk/node_modules/readdir-glob Completed in 779ms
87 timing reifyNode:node_modules/aws-cdk/node_modules/punycode Completed in 779ms
88 timing reifyNode:node_modules/aws-cdk/node_modules/minimatch Completed in 781ms
89 timing reifyNode:node_modules/aws-cdk/node_modules/lodash.union Completed in 781ms
90 timing reifyNode:node_modules/aws-cdk/node_modules/lodash.difference Completed in 781ms
91 timing reifyNode:node_modules/aws-cdk/node_modules/is-buffer Completed in 781ms
92 timing reifyNode:node_modules/aws-cdk/node_modules/http-errors Completed in 780ms
93 timing reifyNode:node_modules/aws-cdk/node_modules/get-uri/node_modules/jsonfile Completed in 781ms
94 timing reifyNode:node_modules/aws-cdk/node_modules/get-caller-file Completed in 781ms
95 timing reifyNode:node_modules/aws-cdk/node_modules/ftp/node_modules/isarray Completed in 780ms
96 timing reifyNode:node_modules/aws-cdk/node_modules/fs.realpath Completed in 780ms
97 timing reifyNode:node_modules/aws-cdk/node_modules/crc32-stream/node_modules/string_decoder Completed in 780ms
98 timing reifyNode:node_modules/aws-cdk/node_modules/compress-commons/node_modules/string_decoder Completed in 781ms
99 timing reifyNode:node_modules/aws-cdk/node_modules/bl/node_modules/string_decoder Completed in 780ms
100 timing reifyNode:node_modules/aws-cdk/node_modules/archiver-utils Completed in 781ms
101 timing reifyNode:node_modules/aws-cdk/node_modules/archiver/node_modules/string_decoder Completed in 781ms
102 timing reifyNode:node_modules/aws-cdk/node_modules/ansi-styles Completed in 781ms
103 timing reifyNode:node_modules/aws-cdk/node_modules/string_decoder Completed in 789ms
104 timing reifyNode:node_modules/aws-cdk/node_modules/setprototypeof Completed in 789ms
105 timing reifyNode:node_modules/aws-cdk/node_modules/safe-buffer Completed in 788ms
106 timing reifyNode:node_modules/aws-cdk/node_modules/graceful-fs Completed in 788ms
107 timing reifyNode:node_modules/aws-cdk/node_modules/data-uri-to-buffer Completed in 788ms
108 timing reifyNode:node_modules/aws-cdk/node_modules/zip-stream/node_modules/safe-buffer Completed in 794ms
109 timing reifyNode:node_modules/aws-cdk/node_modules/xml2js/node_modules/sax Completed in 795ms
110 timing reifyNode:node_modules/aws-cdk/node_modules/uri-js/node_modules/punycode Completed in 795ms
111 timing reifyNode:node_modules/aws-cdk/node_modules/tar-stream/node_modules/safe-buffer Completed in 795ms
112 timing reifyNode:node_modules/aws-cdk/node_modules/require-directory Completed in 794ms
113 timing reifyNode:node_modules/aws-cdk/node_modules/raw-body Completed in 794ms
114 timing reifyNode:node_modules/aws-cdk/node_modules/jsonfile Completed in 796ms
115 timing reifyNode:node_modules/aws-cdk/node_modules/isarray Completed in 796ms
116 timing reifyNode:node_modules/aws-cdk/node_modules/file-uri-to-path Completed in 795ms
117 timing reifyNode:node_modules/aws-cdk/node_modules/crc32-stream Completed in 795ms
118 timing reifyNode:node_modules/aws-cdk/node_modules/crc32-stream/node_modules/safe-buffer Completed in 795ms
119 timing reifyNode:node_modules/aws-cdk/node_modules/compress-commons/node_modules/safe-buffer Completed in 795ms
120 timing reifyNode:node_modules/aws-cdk/node_modules/bl/node_modules/safe-buffer Completed in 794ms
121 timing reifyNode:node_modules/aws-cdk/node_modules/archiver/node_modules/safe-buffer Completed in 795ms
122 timing reifyNode:node_modules/aws-cdk/node_modules/type-check Completed in 802ms
123 timing reifyNode:node_modules/aws-cdk/node_modules/statuses Completed in 802ms
124 timing reifyNode:node_modules/aws-cdk/node_modules/socks-proxy-agent Completed in 802ms
125 timing reifyNode:node_modules/aws-cdk/node_modules/promptly Completed in 803ms
126 timing reifyNode:node_modules/aws-cdk/node_modules/http-proxy-agent Completed in 802ms
127 timing reifyNode:node_modules/aws-cdk/node_modules/debug Completed in 802ms
128 timing reifyNode:node_modules/aws-cdk/node_modules/core-util-is Completed in 802ms
129 timing reifyNode:node_modules/aws-cdk/node_modules/concat-map Completed in 802ms
130 timing reifyNode:node_modules/aws-cdk/node_modules/color-convert Completed in 802ms
131 timing reifyNode:node_modules/aws-cdk/node_modules/safer-buffer Completed in 809ms
132 timing reifyNode:node_modules/aws-cdk/node_modules/estraverse Completed in 807ms
133 timing reifyNode:node_modules/aws-cdk/node_modules/crc-32 Completed in 807ms
134 timing reifyNode:node_modules/aws-cdk/node_modules/tar-stream Completed in 813ms
135 timing reifyNode:node_modules/aws-cdk/node_modules/sax Completed in 813ms
136 timing reifyNode:node_modules/aws-cdk/node_modules/proxy-from-env Completed in 820ms
137 timing reifyNode:node_modules/aws-cdk/node_modules/pac-proxy-agent Completed in 821ms
138 timing reifyNode:node_modules/aws-cdk/node_modules/escalade Completed in 819ms
139 timing reifyNode:node_modules/aws-cdk/node_modules/y18n Completed in 825ms
140 timing reifyNode:node_modules/aws-cdk/node_modules/xml2js Completed in 826ms
141 timing reifyNode:node_modules/aws-cdk/node_modules/optionator Completed in 825ms
142 timing reifyNode:node_modules/aws-cdk/node_modules/json-diff Completed in 824ms
143 timing reifyNode:node_modules/aws-cdk/node_modules/glob Completed in 824ms
144 timing reifyNode:node_modules/aws-cdk/node_modules/emoji-regex Completed in 823ms
145 timing reifyNode:node_modules/aws-cdk/node_modules/deep-is Completed in 823ms
146 timing reifyNode:node_modules/aws-cdk/node_modules/wordwrap Completed in 830ms
147 timing reifyNode:node_modules/aws-cdk/node_modules/tslib Completed in 829ms
148 timing reifyNode:node_modules/aws-cdk/node_modules/source-map-support Completed in 829ms
149 timing reifyNode:node_modules/aws-cdk/node_modules/md5 Completed in 828ms
150 timing reifyNode:node_modules/aws-cdk/node_modules/levn Completed in 828ms
151 timing reifyNode:node_modules/aws-cdk/node_modules/jsonschema Completed in 828ms
152 timing reifyNode:node_modules/aws-cdk/node_modules/json-schema-traverse Completed in 828ms
153 timing reifyNode:node_modules/aws-cdk/node_modules/escodegen Completed in 827ms
154 timing reifyNode:node_modules/aws-cdk/node_modules/buffer Completed in 826ms
155 timing reifyNode:node_modules/aws-cdk/node_modules/url Completed in 834ms
156 timing reifyNode:node_modules/aws-cdk/node_modules/proxy-agent Completed in 832ms
157 timing reifyNode:node_modules/aws-cdk/node_modules/ftp Completed in 831ms
158 timing reifyNode:node_modules/aws-cdk/node_modules/fast-deep-equal Completed in 830ms
159 timing reifyNode:node_modules/aws-cdk/node_modules/esutils Completed in 830ms
160 timing reifyNode:node_modules/aws-cdk/node_modules/cliui Completed in 830ms
161 timing reifyNode:node_modules/aws-cdk/node_modules/prelude-ls Completed in 836ms
162 timing reifyNode:node_modules/aws-cdk/node_modules/netmask Completed in 835ms
163 timing reifyNode:node_modules/aws-cdk/node_modules/ip Completed in 835ms
164 timing reifyNode:node_modules/aws-cdk/node_modules/heap Completed in 835ms
165 timing reifyNode:node_modules/aws-cdk/node_modules/degenerator Completed in 834ms
166 timing reifyNode:node_modules/aws-cdk/node_modules/https-proxy-agent Completed in 839ms
167 timing reifyNode:node_modules/aws-cdk/node_modules/archiver Completed in 837ms
168 timing reifyNode:node_modules/aws-cdk/node_modules/lazystream Completed in 843ms
169 timing reifyNode:node_modules/aws-cdk/node_modules/bl Completed in 840ms
170 timing reifyNode:node_modules/aws-cdk/node_modules/agent-base Completed in 840ms
171 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 855ms
172 timing auditReport:getReport Completed in 857ms
173 timing auditReport:init Completed in 0ms
174 timing reify:audit Completed in 857ms
175 timing reifyNode:node_modules/aws-cdk/node_modules/querystring Completed in 849ms
176 timing reifyNode:node_modules/aws-cdk/node_modules/depd Completed in 846ms
177 timing reifyNode:node_modules/aws-cdk/node_modules/cli-color Completed in 846ms
178 timing reifyNode:node_modules/aws-cdk/node_modules/xregexp Completed in 858ms
179 timing reifyNode:node_modules/aws-cdk/node_modules/yargs-parser Completed in 869ms
180 timing reifyNode:node_modules/aws-cdk/node_modules/ftp/node_modules/readable-stream Completed in 865ms
181 timing reifyNode:node_modules/aws-cdk/node_modules/fast-json-stable-stringify Completed in 865ms
182 timing reifyNode:node_modules/aws-cdk/node_modules/compress-commons Completed in 872ms
183 timing reifyNode:node_modules/aws-cdk/node_modules/dreamopt Completed in 881ms
184 timing reifyNode:node_modules/aws-cdk/node_modules/printj Completed in 887ms
185 timing reifyNode:node_modules/aws-cdk/node_modules/events Completed in 884ms
186 timing reifyNode:node_modules/aws-cdk/node_modules/aws-sdk/node_modules/uuid Completed in 883ms
187 timing reifyNode:node_modules/aws-cdk/node_modules/esprima Completed in 888ms
188 timing reifyNode:node_modules/aws-cdk/node_modules/smart-buffer Completed in 897ms
189 timing reifyNode:node_modules/aws-cdk/node_modules/difflib Completed in 900ms
190 timing reifyNode:node_modules/aws-cdk/node_modules/colors Completed in 900ms
191 timing reifyNode:node_modules/aws-cdk/node_modules/get-uri Completed in 907ms
192 timing reifyNode:node_modules/aws-cdk/node_modules/xmlbuilder Completed in 921ms
193 timing reifyNode:node_modules/aws-cdk/node_modules/readable-stream Completed in 920ms
194 timing reifyNode:node_modules/aws-cdk/node_modules/zip-stream/node_modules/readable-stream Completed in 929ms
195 timing reifyNode:node_modules/aws-cdk/node_modules/tar-stream/node_modules/readable-stream Completed in 929ms
196 timing reifyNode:node_modules/aws-cdk/node_modules/crc32-stream/node_modules/readable-stream Completed in 925ms
197 timing reifyNode:node_modules/aws-cdk/node_modules/compress-commons/node_modules/readable-stream Completed in 925ms
198 timing reifyNode:node_modules/aws-cdk/node_modules/bl/node_modules/readable-stream Completed in 924ms
199 timing reifyNode:node_modules/aws-cdk/node_modules/archiver/node_modules/readable-stream Completed in 925ms
200 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fyaml-cfn 851ms (from cache)
201 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fcfnspec 857ms (from cache)
202 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fcloud-assembly-schema 861ms (from cache)
203 http fetch GET 304 https://registry.npmjs.org/cdk-assets 868ms (from cache)
204 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fcx-api 868ms (from cache)
205 timing reifyNode:node_modules/aws-cdk/node_modules/iconv-lite Completed in 959ms
206 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fcloudformation-diff 886ms (from cache)
207 http fetch GET 304 https://registry.npmjs.org/@aws-cdk%2fregion-info 889ms (from cache)
208 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/yaml-cfn/-/yaml-cfn-1.75.0.tgz 45ms (from cache)
209 timing reifyNode:node_modules/aws-cdk/node_modules/pac-resolver Completed in 988ms
210 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-1.75.0.tgz 41ms (from cache)
211 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/cfnspec/-/cfnspec-1.75.0.tgz 60ms (from cache)
212 http fetch GET 200 https://registry.npmjs.org/cdk-assets/-/cdk-assets-1.75.0.tgz 58ms (from cache)
213 timing reifyNode:node_modules/aws-cdk/node_modules/jmespath Completed in 1013ms
214 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/cx-api/-/cx-api-1.75.0.tgz 62ms (from cache)
215 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/cloudformation-diff/-/cloudformation-diff-1.75.0.tgz 55ms (from cache)
216 http fetch GET 200 https://registry.npmjs.org/@aws-cdk/region-info/-/region-info-1.75.0.tgz 54ms (from cache)
217 timing reifyNode:node_modules/aws-cdk/node_modules/semver Completed in 1038ms
218 timing reifyNode:node_modules/aws-cdk/node_modules/get-uri/node_modules/fs-extra Completed in 1046ms
219 timing reifyNode:node_modules/aws-cdk/node_modules/fs-extra Completed in 1045ms
220 timing reifyNode:node_modules/aws-cdk/node_modules/socks Completed in 1052ms
221 timing reifyNode:node_modules/aws-cdk/node_modules/diff Completed in 1049ms
222 timing reifyNode:node_modules/aws-cdk/node_modules/aws-sdk/node_modules/buffer Completed in 1052ms
223 timing reifyNode:node_modules/aws-cdk/node_modules/source-map Completed in 1067ms
224 timing reifyNode:node_modules/aws-cdk/node_modules/uuid Completed in 1077ms
225 timing reifyNode:node_modules/aws-cdk/node_modules/uri-js Completed in 1079ms
226 timing reifyNode:node_modules/aws-cdk/node_modules/yargs Completed in 1081ms
227 timing reifyNode:node_modules/aws-cdk/node_modules/yaml Completed in 1086ms
228 timing reifyNode:node_modules/aws-cdk/node_modules/table Completed in 1087ms
229 timing reifyNode:node_modules/aws-cdk/node_modules/ast-types Completed in 1082ms
230 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/region-info Completed in 1092ms
231 timing reifyNode:node_modules/aws-cdk/node_modules/cdk-assets Completed in 1101ms
232 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/cloudformation-diff Completed in 1102ms
233 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/yaml-cfn Completed in 1133ms
234 timing reifyNode:node_modules/aws-cdk/node_modules/ajv Completed in 1133ms
235 timing reifyNode:node_modules/aws-cdk/node_modules/async Completed in 1139ms
236 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/cx-api Completed in 1143ms
237 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/cloud-assembly-schema Completed in 1145ms
238 timing reifyNode:node_modules/aws-cdk/node_modules/es5-ext Completed in 1158ms
239 timing reifyNode:node_modules/aws-cdk/node_modules/@aws-cdk/cfnspec Completed in 1181ms
240 timing reifyNode:node_modules/aws-cdk/node_modules/lodash Completed in 1235ms
241 timing reifyNode:node_modules/aws-cdk/node_modules/aws-sdk Completed in 1372ms
242 timing reify:unpack Completed in 1380ms
243 timing reify:unretire Completed in 0ms
244 timing build:queue Completed in 3ms
245 timing reify:rollback:createSparse Completed in 211ms
246 timing reify:rollback:retireShallow Completed in 0ms
247 timing command:ci Completed in 2013ms
248 verbose stack Error: ENOENT: no such file or directory, chmod '/test/node_modules/aws-cdk/bin/cdk'
249 verbose cwd /test
250 verbose Linux 5.9.0-0.bpo.5-amd64
251 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "ci"
252 verbose node v10.19.0
253 verbose npm  v7.5.0
254 error code ENOENT
255 error syscall chmod
256 error path /test/node_modules/aws-cdk/bin/cdk
257 error errno -2
258 error enoent ENOENT: no such file or directory, chmod '/test/node_modules/aws-cdk/bin/cdk'
259 error enoent This is related to npm not being able to find a file.
260 verbose exit -2

@darcyclarke darcyclarke removed their assignment Feb 2, 2021
@jayphelps
Copy link

jayphelps commented Feb 2, 2021

Hitting this as well only using GitHub Actions + npm v7 but not locally on any devs machine. Happy to provide any info to help debug or Zoom. (npm@7.5.2). Mine isn't with aws bin but instead @cloudflare/wrangler's bin.

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/runner/work/internals/internals/node_modules/@cloudflare/wrangler/run-wrangler.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/runner/work/internals/internals/node_modules/@cloudflare/wrangler/run-wrangler.js'
npm ERR! enoent This is related to npm not being able to find a file.

I tried doing some digging but I'm unfamiliar with the codebase. It seems like maybe the linking of bins is ultimately handled by another library npm folks maintain bin-links. Didn't see anything immediately screwy, but then again it seems to handle lots of edge cases, and the problem might be higher in the code.

FWIW npm install @cloudflare/wrangler produces the error alone as well, but npm install @cloudflare/wrangler --global does not. I'm using that as my current workaround (not having it as a local dependency so it doesn't fail in CI)

@fluiddot
Copy link

fluiddot commented Feb 9, 2021

I'm having a similar issue but in my case the dependency that causes the error is appium. The only way I found to solve it is by running:

  1. npx npm@6 install
  2. npm install
  3. npm ci

After following these steps and even in a clean install I don’t get the error again. However this is just a workaround, I wouldn’t expect to have to install dependencies with a previous version.

My impression is that having the following combo produces the issue:

  • One or more of your dependencies create symlink references (in my case appium).
  • The package-lock.json lock file format is version 1 (created with any version previous to NPM version 7).
  • Install dependencies with NPM version 7 and changing package-lock.json lock file format to version 2.

@igilham
Copy link

igilham commented Feb 11, 2021

Same issue here, as per aws/aws-cdk#12354. This bug prevents adoption of NPM v7 for my project.

A possible work-around might be available if the lockfile version could be set in .npmrc.

@nigelhanlon
Copy link

As a workaround, I deleted the package-lock.json file as well as the node_modules folder. Install worked fine after that.

In my case, the package lock file had been upgraded automatically which I think may have broken the install.

Worth a shot for those stuck but can't guarantee it will work for you. Good luck.

@nlf nlf self-assigned this Feb 16, 2021
isaacs added a commit to npm/arborist that referenced this issue Feb 18, 2021
We loop over the diff.leaves to find all the shrinkwraps that _must_ be
unpacked ahead of time in order to complete the idealTree.  However, if
the idealTree already contains the children of the shrinkwrap-containing
module (because it's been previously installed and saved to a lockfile),
then we saw the hasShrinkwrap flag, and assumed it had already been
unpacked.

This tracks a Set of all nodes unpacked for the purposes of reading
their shrinkwraps, and only skips _those_ modules at unpackNewModules.

Different approach than #233, without adding extra items into the
diff.leaves, which can have the side effect of calling mkdirp more than
necessary.

Close: #233
Fix: npm/cli#2251
Reviewed-by: @nlf
isaacs added a commit that referenced this issue Feb 18, 2021
* [#1875](#1875)
  [npm/arborist#230](npm/arborist#230) Set default
  advisory `severity`/`vulnerable_range` when missing from audit endpoint
  data ([@isaacs](https://github.com/isaacs))
* [npm/arborist#231](npm/arborist#231) skip
  optional deps with mismatched platform or engine
  ([@nlf](https://github.com/nlf))
* [#2251](#2251) Unpack shrinkwrapped deps
  not already unpacked ([@isaacs](https://github.com/isaacs),
  [@nlf](https://github.com/nlf))
* [#2714](#2714) Do not write package.json
  if nothing changed ([@isaacs](https://github.com/isaacs))
* [npm/rfcs#324](npm/rfcs#324) Prefer peer over
  prod dep, if both specified ([@isaacs](https://github.com/isaacs))
* [npm/arborist#236](npm/arborist#236) Fix
  additional peerOptional conflict cases
  ([@isaacs](https://github.com/isaacs))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
9 participants