question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CDK throws "ENOENT: no such file or directory, open cdk.out\manifest.json" in most commands

See original GitHub issue

Any command I try from the CDK throws this error

Reproduction Steps

Download the code from https://github.com/AlanCS/WorkSplitCalculator and run for example “cdk list --verbose”

What did you expect to happen?

I copied the project from https://github.com/aws-samples/aws-cdk-examples/tree/master/csharp/capitalize-string and made a few changes (like moving to .net core 3.1) and added an API gateway, now the whole thing stopped working

just as a test, I tried to run the commands on the original example, and now those throw the same error as well

I expected to work straight out of the box

What actually happened?

# cdk list --verbose
(node:10492) ExperimentalWarning: The fs.promises API is experimental
CDK toolkit version: 1.69.0 (build 2b474b9)
Command line arguments: { _: [ 'list' ],
  verbose: 1,
  v: 1,
  'ignore-errors': false,
  ignoreErrors: false,
  json: false,
  j: false,
  ec2creds: undefined,
  i: undefined,
  'version-reporting': undefined,
  versionReporting: undefined,
  'path-metadata': true,
  pathMetadata: true,
  'asset-metadata': true,
  assetMetadata: true,
  'role-arn': undefined,
  r: undefined,
  roleArn: undefined,
  staging: true,
  'no-color': false,
  noColor: false,
  fail: false,
  long: false,
  l: false,
  '$0':
   'C:\\ProgramData\\scoop\\apps\\nodejs\\current\\bin\\node_modules\\aws-cdk\\bin\\cdk' }
cdk.json: {
  "app": "dotnet publish -c Release src"
}
merged settings: { versionReporting: true,
  pathMetadata: true,
  output: 'cdk.out',
  app: 'dotnet publish -c Release src',
  context: {},
  assetMetadata: true,
  toolkitBucket: {},
  staging: true,
  bundlingStacks: [] }
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to ap-southeast-2
Resolving default credentials
Retrieved account ID 123456789 from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 123456789
context: { 'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true,
  'aws:cdk:version-reporting': true,
  'aws:cdk:bundling-stacks': [] }
outdir: cdk.out
env: { CDK_DEFAULT_REGION: 'ap-southeast-2',
  CDK_DEFAULT_ACCOUNT: '123456789',
  CDK_CONTEXT_JSON:
   '{"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":[]}',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '6.0.0',
  CDK_CLI_VERSION: '1.69.0' }
Microsoft (R) Build Engine version 16.7.0+7fb82e5b2 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  CapitalizeStringHandler -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\CapitalizeStringHandler\bin\Release\netcoreapp3.1\CapitalizeStringHandler.dll
  CapitalizeStringHandler -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\CapitalizeStringHandler\bin\Release\netcoreapp3.1\publish\
  CapitalizeStringHandler.Tests -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\test\CapitalizeStringHandler.Tests\bin\Release\netcoreapp3.1\CapitalizeStringHandler.Tests.dll
  CdkStack -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\CdkStack\bin\Release\netcoreapp3.1\CdkStack.dll
  CapitalizeStringHandler.Tests -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\test\CapitalizeStringHandler.Tests\bin\Release\netcoreapp3.1\publish\
  CdkStack -> C:\Users\AlanPC\source\repos\WorkSplitCalculator\src\CdkStack\bin\Release\netcoreapp3.1\publish\
ENOENT: no such file or directory, open 'cdk.out\manifest.json'
Error: ENOENT: no such file or directory, open 'cdk.out\manifest.json'
    at Object.fs.openSync (fs.js:577:3)
    at Object.fs.readFileSync (fs.js:483:33)
    at Function.loadManifest (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\node_modules\@aws-cdk\cloud-assembly-schema\lib\manifest.ts:131:29)
    at Function.loadAssemblyManifest (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\node_modules\@aws-cdk\cloud-assembly-schema\lib\manifest.ts:44:21)
    at Function.load (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\node_modules\@aws-cdk\cloud-assembly-schema\lib\manifest.ts:83:81)
    at new CloudAssembly (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\node_modules\@aws-cdk\cx-api\lib\cloud-assembly.ts:52:39)
    at createAssembly (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\lib\api\cxapp\exec.ts:78:14)
    at Object.execProgram (C:\ProgramData\scoop\persist\nodejs\bin\node_modules\aws-cdk\lib\api\cxapp\exec.ts:74:10)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Environment

Running Visual Studio 2019 on a Windows 10 machine

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wcheekcommented, Aug 2, 2022

For me, this was also not a bug. I had accidentally removed app.synth() at the bottom of my app.py. Add it back and you should be good to go!

0reactions
github-actions[bot]commented, Oct 26, 2020

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk yarn synth -o /tmp/artifacts returning error ENOENT
json : No license field $ cdk synth -o /tmp/artifacts ENOENT: no such file or directory, open '/tmp/artifacts/manifest.json' error Command failed ...
Read more >
awslabs/aws-cdk - Gitter
I keep getting ENOENT: no such file or directory, open 'cdk.out/manifest.json' when I try to npm run deploy. where deploy is defined as:...
Read more >
Troubleshooting common AWS CDK issues
The file cdk.json in this directory, created by the cdk init command, contains the command line needed to run (and thereby synthesize) your...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
JSON Files - Spark 3.3.1 Documentation
Property Name Default Scope primitivesAsString false read prefersDecimal false read allowComments false read
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found