@@ -406,6 +406,106 @@ npm error A complete log of this run can be found in: /home/some-path/.npm/_logs
406
406
errorName : 'AccessDeniedError' ,
407
407
expectedDownstreamErrorMessage : undefined ,
408
408
} ,
409
+ {
410
+ errorMessage :
411
+ `Error: Transform failed with 1 error:` +
412
+ EOL +
413
+ `/Users/some-path/amplify/storage/resource.ts:1:2: ERROR: Expected identifier but found }` +
414
+ EOL +
415
+ `at failureErrorWithLog (/Users/some-path/esbuild/lib/main.js:123:45)` +
416
+ EOL +
417
+ `at /Users/some-path/esbuild/lib/main.js:678:90` ,
418
+ expectedTopLevelErrorMessage :
419
+ '/Users/some-path/amplify/storage/resource.ts:1:2: ERROR: Expected identifier but found }' ,
420
+ errorName : 'ESBuildError' ,
421
+ expectedDownstreamErrorMessage : undefined ,
422
+ } ,
423
+ {
424
+ errorMessage :
425
+ `Error [TransformError]:` +
426
+ EOL +
427
+ `You installed esbuild for another platform than the one you're currently using.
428
+ This won't work because esbuild is written with native code and needs to
429
+ install a platform-specific binary executable.` +
430
+ EOL +
431
+ `Specifically the @esbuild/linux-arm64 package is present but this platform
432
+ needs the @esbuild/darwin-arm64 package instead. People often get into this
433
+ situation by installing esbuild on Windows or macOS and copying node_modules
434
+ into a Docker image that runs Linux, or by copying node_modules between
435
+ Windows and WSL environments.` +
436
+ EOL +
437
+ `If you are installing with npm, you can try not copying the node_modules
438
+ directory when you copy the files over, and running npm ci or npm install
439
+ on the destination platform after the copy. Or you could consider using yarn
440
+ instead of npm which has built-in support for installing a package on multiple
441
+ platforms simultaneously.` +
442
+ EOL +
443
+ `If you are installing with yarn, you can try listing both this platform and the
444
+ other platform in your .yarnrc.yml file using the supportedArchitectures
445
+ feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
446
+ Keep in mind that this means multiple copies of esbuild will be present.` +
447
+ EOL +
448
+ // eslint-disable-next-line spellcheck/spell-checker
449
+ `Another alternative is to use the esbuild-wasm package instead, which works
450
+ the same way on all platforms. But it comes with a heavy performance cost and
451
+ can sometimes be 10x slower than the esbuild package, so you may also not want to do that.` ,
452
+ expectedTopLevelErrorMessage :
453
+ `You installed esbuild for another platform than the one you're currently using.
454
+ This won't work because esbuild is written with native code and needs to
455
+ install a platform-specific binary executable.` +
456
+ EOL +
457
+ `Specifically the @esbuild/linux-arm64 package is present but this platform
458
+ needs the @esbuild/darwin-arm64 package instead. People often get into this
459
+ situation by installing esbuild on Windows or macOS and copying node_modules
460
+ into a Docker image that runs Linux, or by copying node_modules between
461
+ Windows and WSL environments.` +
462
+ EOL +
463
+ `If you are installing with npm, you can try not copying the node_modules
464
+ directory when you copy the files over, and running npm ci or npm install
465
+ on the destination platform after the copy. Or you could consider using yarn
466
+ instead of npm which has built-in support for installing a package on multiple
467
+ platforms simultaneously.` +
468
+ EOL +
469
+ `If you are installing with yarn, you can try listing both this platform and the
470
+ other platform in your .yarnrc.yml file using the supportedArchitectures
471
+ feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
472
+ Keep in mind that this means multiple copies of esbuild will be present.` +
473
+ EOL +
474
+ // eslint-disable-next-line spellcheck/spell-checker
475
+ `Another alternative is to use the esbuild-wasm package instead, which works
476
+ the same way on all platforms. But it comes with a heavy performance cost and
477
+ can sometimes be 10x slower than the esbuild package, so you may also not want to do that.` ,
478
+ errorName : 'ESBuildError' ,
479
+ expectedDownstreamErrorMessage : undefined ,
480
+ } ,
481
+ {
482
+ errorMessage :
483
+ `Error [TransformError]: The package esbuild-package could not be found, and is needed by esbuild.` +
484
+ EOL +
485
+ `If you are installing esbuild with npm, make sure that you don't specify the
486
+ --no-optional or --omit=optional flags. The optionalDependencies feature
487
+ of package.json is used by esbuild to install the correct binary executable
488
+ for your current platform.
489
+ ` +
490
+ EOL +
491
+ `at generateBinPath (/Users/some-path/esbuild/lib/main.js:123:45)` +
492
+ EOL +
493
+ `at /Users/some-path/esbuild/lib/main.js:678:90` ,
494
+ expectedTopLevelErrorMessage :
495
+ `The package esbuild-package could not be found, and is needed by esbuild.` +
496
+ EOL +
497
+ `If you are installing esbuild with npm, make sure that you don't specify the
498
+ --no-optional or --omit=optional flags. The optionalDependencies feature
499
+ of package.json is used by esbuild to install the correct binary executable
500
+ for your current platform.
501
+ ` +
502
+ EOL +
503
+ `at generateBinPath (/Users/some-path/esbuild/lib/main.js:123:45)` +
504
+ EOL +
505
+ `at /Users/some-path/esbuild/lib/main.js:678:90` ,
506
+ errorName : 'ESBuildError' ,
507
+ expectedDownstreamErrorMessage : undefined ,
508
+ } ,
409
509
] ;
410
510
411
511
void describe ( 'invokeCDKCommand' , { concurrency : 1 } , ( ) => {
0 commit comments