Thanks so much for this tutorial! It's certainly got me the closest to publishing and installing a private package.
However, when I try this, my package – and your package – is installed unscoped.
It installs under node_modules/typescript-package-starter not node_modules/@dalenguyen/typescript-package-starter and you need to descope the require as well:
I guess in theory the de-scoping I am experiencing should not be a problem – because the code works – but it's strange considering it could potentially clash with an unscoped package of the same name.
Any ideas?
P.S. You can color-code your codeblocks by appending the language name to codeblock backticks, i.e. '''js
Hey Dale,
Thanks so much for this tutorial! It's certainly got me the closest to publishing and installing a private package.
However, when I try this, my package – and your package – is installed unscoped.
It installs under
node_modules/typescript-package-starter
notnode_modules/@dalenguyen/typescript-package-starter
and you need to descope the require as well:This is the same experience I have had with my own package.
When add the
@org-name/
in thepackage.json
name as per normal NPM packages......the install command under GitHub packages ends up including the scope twice, so for your package would be:
I guess in theory the de-scoping I am experiencing should not be a problem – because the code works – but it's strange considering it could potentially clash with an unscoped package of the same name.
Any ideas?
P.S. You can color-code your codeblocks by appending the language name to codeblock backticks, i.e.
'''js
Thank Dave for the question. I just tried my package. It installs under node_modules/@dalenguyen
Can you fork my project, modify and deploy to your Github package?
dev-to-uploads.s3.amazonaws.com/i/...
Good plan. Let me try that
Let me know if it works. And can you help to remove the .npmrc file? The token is invalid, but it is better to remove it though. Thanks,