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.

Can't Find Package after updating in NPM

See original GitHub issue

Description of Bug

Many thanks to @markwhitfeld for the followup on #624 related to this issue. We’ve been using Stackblitz for quite some time as a way for our developers to edit the examples in our design system at: https://cashmere.healthcatalyst.net/web/components

Steps to Reproduce

  1. Go to https://stackblitz.com/edit/angular-suepzj
  2. Let the project attempt to load and compile
  3. See error in right panel - “Can’t find package: @healthcatalyst/cashmere

Additional Context/Questions Version 13.0.0 does exist on NPM and can be pulled in to applications: https://www.npmjs.com/package/@healthcatalyst/cashmere

It might be worth noting that on line 28 of package.json we are using the following syntax to import Cashmere: "@healthcatalyst/cashmere": "*" I’m not sure if using a star is causing a problem for Stackblitz. It’s worked in the past, but maybe something changed with this release? Also worth noting that if I change line 28 to: "@healthcatalyst/cashmere": "12.8.1" …then Stackblitz loads the package correctly. So it’s just something that’s turned up with this v13 release. Lucky 13 😃

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
markwhitfeldcommented, Aug 23, 2022

Hi @andrew-frueh and @corykon I somehow missed this notification. I had a quick look, and it seems that there is an issue in the package.json since the v13.0.0 release of @healthcatalyst/cashmere. The main field of the package.json refers to a file /bundles/cashmere.umd.js which is not included in the package. The StackBlitz project is failing when it follows the main entrypoint and the file does not exist. I will add an issue into the backlog to try to improve the error message, because the current failure is a bit confusing. You can see the issue with the entrypoint using runpkg here: https://www.runpkg.com/?@healthcatalyst/cashmere@13.2.0 https://www.runpkg.com/?@healthcatalyst/cashmere@13.0.0 See: https://www.runpkg.com/?@healthcatalyst/cashmere@13.2.0/package.json#13 (haha, an unlucky line 13 too 😉 )

And it works in the last v12 version: https://www.runpkg.com/?@healthcatalyst/cashmere@12.8.1

I will close this issue, and the internal task I mentioned.

2reactions
markwhitfeldcommented, Sep 20, 2022

Hi there. Just to let you know, we have improved our error messaging so that it is easier to detect this type of issue in future. See my reproduction project: https://stackblitz.com/edit/sb-repro-angular-entrypoint-failure-message Here is the error message: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm can't find package.json - Stack Overflow
After downloading or creating a project, you have to cd into this project folder. Inside is the file package.json. cd <path_to_project> npm install....
Read more >
Couldn't find package "package-name" on the "npm" registry ...
Whenever executing yarn install I get an error message - Couldn't find package "[PACKAGE_NAME]" on the "npm" registry . After removing the ...
Read more >
Updating packages downloaded from the registry - npm Docs
Updating local packages ; Navigate to the root directory of your project and ensure it contains a package.json file: cd /path/to/project ; In...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >
Manage npm packages - Visual Studio (Windows)
When you save the file, Visual Studio adds the package under the Dependencies / npm node in Solution Explorer. If you don't see...
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