Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "npmAccess" cannot be RESTRICTED for non-scoped npm package #731

Open
ottokruse opened this issue Jan 2, 2025 · 1 comment
Open

Comments

@ottokruse
Copy link

This should just work?

mkdir cdklabs-cdk-test
cd cdklabs-test
npx projen new --from cdklabs-projen-project-types cdklabs-construct-lib
/Users/myname/git/cdklabs-cdk-test
└── (empty)


added 2 packages in 1s

10 packages are looking for funding
  run `npm fund` for details
👾 installing module cdklabs-projen-project-types...

added 1 package, and audited 70 packages in 2s

10 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

/Users/ottokrus/git/cdklabs-cdk-test/node_modules/projen/lib/javascript/node-package.js:402
            throw new Error(`"npmAccess" cannot be RESTRICTED for non-scoped npm package "${this.packageName}"`);
            ^

Error: "npmAccess" cannot be RESTRICTED for non-scoped npm package "cdklabs-cdk-test"`
@rpawlaszek
Copy link

It indeed worked on empty directories, so if it's not a bug - it seems to be a change. As a (potentially temporary) solution use:

npx projen new --from cdklabs-projen-project-types cdklabs-construct-lib --npmAccess PUBLIC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants