Hi,
I followed the steps and created a sample package and published in npm as well, But when I tried to consume the npm package I am getting the following err: Cannot find module '@messages2raja/pattern-lib' or its corresponding type declarations.ts(2307)..Please help me to solve this issue.
Working with Web Technologies since ~20 years now and am seeking for a new challenge ever since. 😍
FinTech | Lead Developer @ Debtvision
Previously: FE Lead @ Mercedes-Benz.io
Working with Web Technologies since ~20 years now and am seeking for a new challenge ever since. 😍
FinTech | Lead Developer @ Debtvision
Previously: FE Lead @ Mercedes-Benz.io
I think i can see the problem. You were probably running npm publish in your root directory right?
That however would publish your whole angular project. What you want instead is build it and then go to dist/pattern-lib and run npm publish from there :)
Hope that solves it. I will enhance the article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
I followed the steps and created a sample package and published in npm as well, But when I tried to consume the npm package I am getting the following err:
Cannot find module '@messages2raja/pattern-lib' or its corresponding type declarations.ts(2307)..Please help me to solve this issue.
Can you provide more information where your @messages2raja /pattern-lib is located and how you installed it?
it is located in npmjs.org url: npmjs.com/package/@messages2raja/p...
I have installed it via the npm i command.
I think i can see the problem. You were probably running
npm publish
in your root directory right?That however would publish your whole angular project. What you want instead is build it and then go to
dist/pattern-lib
and runnpm publish
from there :)Hope that solves it. I will enhance the article.