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.

[BUG] symlinked package's dependencies are not resolved

See original GitHub issue
  • [ x ] I am on the latest version of Snowpack & all plugins. (“snowpack”: “^3.5.5”)

  • [ x] I use package manager npm (Fill in: npm, yarn, pnpm, etc).

  • [ x] I run Snowpack on Node.js v12+ (node v14.16.0)

When symlinking a local npm package for local development, Error: Package "react-paginate" not found. Have you installed it?. The react-paginate package is installed in the symlinked npm package but snowpack is not resolving dependencies from the symlinked dir’s node_modules/.

I confirmed this is the case by copying the entire npm package to the snowpack project’s node_modules/ and everything works as expected.

The project is a lerna monorepo with snowpack.config.js:

module.exports = {
  workspaceRoot: '../../',
}

_Originally posted by @crobinson42 in https://github.com/snowpackjs/snowpack/issues/2969#issuecomment-853508387_

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:13
  • Comments:10

github_iconTop GitHub Comments

2reactions
Venryxcommented, Jun 17, 2021

I’m hitting the same error, and the cause appears to be the same as what @crobinson42 assessed: snowpack is not looking within the symlinked dependency’s node_modules folder to find its subdependencies.

As a temporary fix, I am adding the subdependencies of the symlinked package as “dev dependencies” of my user project, but this is of course not ideal.

1reaction
paralincommented, Jun 30, 2022

Just ran into this 👍🏽

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] symlinked package's dependencies are not resolved
I confirmed this is the case by copying the entire npm package to the snowpack project's node_modules/ and everything works as expected.
Read more >
rpm fails when there are dir<->symlink replacements and the ...
Okay, the issue is caused by heuristics in rpm 4.11.x which decide when to let dir<->symlink replacement conflicts through in test-transactions: the heuristics ......
Read more >
Symlinked `node_modules` structure | pnpm中文文档
This article only describes how pnpm's node_modules are structured when there are no packages with peer dependencies. For the more complex scenario of ......
Read more >
An alternative to npm-link for relative dependencies
It will result in an error since no dependency has been linked before executing that command. It'll also throw an error when a...
Read more >
Homebrew: Could not symlink, /usr/local/bin is not writable
Following Alex's answer I was able to resolve this issue; seems this to be an issue non specific to the packages being installed...
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