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.

support symlinked packages

See original GitHub issue

Hello,

it seems like I`m unable to use symlinked packages via lerna. When I start it with sls offline it works. When I try to deploy it always takes the npm - version of my (monorepo) package instead of the local version

This is a Feature Proposal

Description

For feature proposals: detect if a package is symlinked and copy/attach this to the node_modules folder for webpack.

  • If there is additional config how would it look

    webpack: includeModules: forceSymlink: - [packagename]

Similar or dependent issue(s):

Additional Data

  • Serverless-Webpack Version you’re using: 5.3.1
  • Webpack version you’re using:
  • Serverless Framework Version you’re using: 1.67.3
  • Operating System: Mac OS
  • Stack Trace (if available):

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ardalanncommented, May 13, 2020

@mogusbi-motech @pharindoko I managed to work around the issue by switching to the file:../package-name notation in my dependencies.

I did not need to add my symlinked module to webpack-node-externals’s whitelist. But I did need to use the following setting in serverless.yml to get rid of my dependency’s devDependencies which were raising my bundle size way above the 250mb limit:

  webpack:
    packagerOptions:
      scripts:
        - (cd node_modules/package-name && npm prune --production)
1reaction
pharindokocommented, Apr 21, 2020

Any workaround or help is appreciated too. I cannot use local symlinked packages added by “lerna add” command.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NuGet packaging should support symlinks within ... - GitHub
We create nuget packages on Linux and macOS by 'nuget.exe pack ..'. Our source folder contains libraries and the set of symbolic links...
Read more >
Symlinks in Windows 10! - Windows Developer Blog
A symlink is essentially a pointer to a file or folder located elsewhere, consumes little space and is very fast to create (compared...
Read more >
npm-link
Symlink a package folder. ... This can be used to work around the fact that some file systems don't support symlinks, even on...
Read more >
Symlinked `node_modules` structure - PNPM
pnpm's node_modules layout uses symbolic links to create a nested structure of dependencies. Every file of every package inside node_modules is a hard...
Read more >
Ubuntu Manpage: npm-link - Symlink a package folder
First, npm link in a package folder will create a globally-installed symbolic link from prefix/package-name to the current folder (see npm help 7...
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