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.

(cli): Can't build the code after upgrading to 1.79.0

See original GitHub issue

After upgrading to version 1.79.0 (from 1.78.0), I get the following error:

❯ npm run build

> infra-cluster@0.1.0 build
> tsc

node_modules/@aws-cdk/aws-cloudfront/lib/index.d.ts:8:10 - error TS1005: 'from' expected.

8 export * as experimental from './experimental';
           ~~

node_modules/@aws-cdk/aws-cloudfront/lib/index.d.ts:8:13 - error TS1005: ';' expected.

8 export * as experimental from './experimental';
              ~~~~~~~~~~~~

node_modules/@aws-cdk/aws-cloudfront/lib/index.d.ts:8:26 - error TS1005: ';' expected.

8 export * as experimental from './experimental';
                           ~~~~

node_modules/@aws-cdk/aws-cloudfront/lib/index.d.ts:8:31 - error TS1005: ';' expected.

8 export * as experimental from './experimental';
                                ~~~~~~~~~~~~~~~~


Found 4 errors.

Unfortunately downgrading package.json to 1.78.0 doesn’t solve the issue.

Reproduction Steps

I’m not sure how to reproduce it (other than my own code) because we also have a couple of other stacks which are working just fine, though they are way (just two ECR repositories and a bunch of IAM stuff) smaller than the cluster stack. I also noticed something else recentaly which is a bit weird: every time I need to install (npm install) some package in my application, I had to remove the whole node_modules folder and package-lock.json file, otherwise it fails with:

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/aws-cdk/bin/cdk
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/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!     /Users/rad/.npm/_logs/2020-12-17T14_56_28_547Z-debug.log

Not sure if it’s related at all.

What did you expect to happen?

To upgrade to the new version

What actually happened?

It fails to compile the code with the above error message.

Environment

  • CDK CLI Version : 1.78.0 (-> 1.79.0)
  • Framework Version: 1.78.0 (-> 1.79.0)
  • Node.js Version: v15.3.0
  • OS : macOS 11.1-20C69
  • Language (Version): 3.7.5

Other


This is 🐛 Bug Report

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
p0wlcommented, Dec 22, 2020

Just figured it out, it is necessary to upgrade typescript.

Upgrading typescript from ~3.7.5 to ~3.9.7 (as set in package.json) fixed it for me.

0reactions
schuettccommented, Jan 28, 2021

~3.9.7

This worked for me as well. Be sure to remove package-lock.json and node_modules then: npm install --save-dev typescript@3.9.7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build Angular project after upgrade from 8 to 9
The suggested workaround is to run the angular compatibility compiler ( ngcc ) as a postinstall script, instead of having the build trigger...
Read more >
B2 User Manual - 1.81.0 - Boost C++ Libraries
When a user initiates a build, B2 automatically translates the requested properties into appropriate command-line flags for invoking toolset components like ...
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Command line interface for Amazon Glacier. ... Bug:491818 - "=sys-apps/portage-2.2.7 ebuild cannot cope with ROOT" status:UNCONFIRMED resolution: severity: ...
Read more >
Installation | Vue CLI
After installation, you will have access to the vue binary in your command line. ... To upgrade the global Vue CLI package, you...
Read more >
Change Log for Plesk Obsidian
The update will take place gradually after release 18.0.48. ... the “Cannot update customer account: unknown country code “XX” warning no longer appears....
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