GithubHelp home page GithubHelp logo

Comments (7)

garysassano avatar garysassano commented on June 3, 2024

Apparently, only yarn accepts the v in front of the semver. Both npm and pnpm refuse to accept that.

This works:

npx projen new awscdk-app-ts --package-manager yarn --cdk-version v2.128.0

And since it works, you end up with a .projenrc.ts and package.json including v2.128.0.

from projen.

mrgrain avatar mrgrain commented on June 3, 2024
npx projen new awscdk-app-ts --package-manager pnpm --cdk-version v2.128.0

Works without problems for me. What version of node are you using?
I don't think projen does anything specifically that would make it prone to v8 FATAL ERRORS.

from projen.

garysassano avatar garysassano commented on June 3, 2024

Restarted the WSL2 env and now the problem is gone. Still, I think we should sanitize the parameters and strip out the v. It's not normal to have that showing up in your package.json.

from projen.

mrgrain avatar mrgrain commented on June 3, 2024

NPM also works:

npx projen new awscdk-app-ts --package-manager npm --cdk-version v2.128.0

^v2.127.0 is a perfectly fine version constraint. You can check this here: https://semver.npmjs.com/
Or run npm show aws-cdk@^v2.127.0 which will also resolve correctly.

from projen.

mrgrain avatar mrgrain commented on June 3, 2024

Restarted the WSL2 env and now the problem is gone. Still, I think we should sanitize the parameters and strip out the v. It's not normal to have that showing up in your package.json.

It is only added because you have put it in the projen new command and it is a perfectly valid semver version constraint that is (at least within the node ecosystem) accept by all major package managers. I'm not inclined to artificially restrict valid use cases.

Happy to update any documentation if we use it somewhere. I agree it's certainly a bit unusual.

from projen.

garysassano avatar garysassano commented on June 3, 2024

It is only added because you have put it in the projen new command and it is a perfectly valid semver version constraint that is (at least within the node ecosystem) accept by all major package managers. I'm not inclined to artificially restrict valid use cases.

Happy to update any documentation if we use it somewhere. I agree it's certainly a bit unusual.

Yeah, I know it's a valid semver, but as you said, it's quite unusual to see that. Even if you are the one explicitly passing it as a parameter, I wouldn't expect to see it in the generated files.

from projen.

mrgrain avatar mrgrain commented on June 3, 2024

Closing this one as it was due to WSL. You're welcome to open a new issue the discuss the automatic stripping of v and gather community input on it.

from projen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.