[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:
- Created 2 years ago
- Reactions:13
- Comments:10
Top GitHub Comments
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.
Just ran into this 👍🏽