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.

projen fails when creating new projects

See original GitHub issue

I try to create a new AWS CDK project with projen new awscdk-app-ts. This works but projen fails afterwards with this error every time I run it:

$ projen
👾 default | node .projenrc.js
/home/username/myproject/.projenrc.js:2
const project = new AwsCdkTypeScriptApp({
                ^

TypeError: AwsCdkTypeScriptApp is not a constructor
    at Object.<anonymous> (/home/username/myproject/.projenrc.js:2:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47
👾 Synthesis failed: Task "default" failed when executing "node .projenrc.js" (cwd: /home/username/myproject)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
eladbcommented, Dec 6, 2021

Our release notes are marked with breaking changes (https://github.com/projen/projen/releases/tag/v0.37.0) and there is a detailed list in the associated pull request description: https://github.com/projen/projen/pull/1286

@Chriscbr I am surprised that not all the breaking changes appear in the release notes. Worth checking…

Closing this issue now.

0reactions
AndrewGuenthercommented, Jul 20, 2022

Just as a heads up, I used projen for the first time today and out-of-the-box on the latest version ran into this same issue.

Repro steps:

npx projen --version
> 0.59.3

npx projen new awscdk-construct

This will generate a .projenrc.js file with the following:

const { AwsCdkConstructLibrary } = require('projen');
const project = new AwsCdkConstructLibrary({
...
});
project.synth();

And if you try to run yarn build you’ll get the following error:

TypeError: AwsCdkConstructLibrary is not a constructor

So something is definitely still busted here…

Read more comments on GitHub >

github_iconTop Results From Across the Web

projen fails to create projects from external modules due to ...
When trying to create a new project from an external module projen fails with an error like: % npx projen new --from cdk-appsync-project...
Read more >
projen - npm
To create a new project, run the following command and follow the instructions: $ mkdir my-project $ cd my-project $ npx projen new...
Read more >
Projen: NodeJS project boilerplating | by Mykhailo Gorianskyi
Some, having faced this problem numerous times before, opted in for maintaining a boilerplate project to be cloned when creating a new project....
Read more >
API Reference | projen
Information passed from projen new to the project object when the project is first created. JsonFileOptions, Options for JsonFile . LicenseOptions, No ...
Read more >
Building Shareable CDK Constructors using Projen - Tech Blog
Let's create our project sentia-user and use the project type for ... mkdir sentia-user $ cd sentia-user $ git init $ npx projen...
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