serverless-layers icon indicating copy to clipboard operation
serverless-layers copied to clipboard

Symlink resolution in node_modules

Open masayuki-tsuji opened this issue 1 year ago • 0 comments

When deploying with pnpm + monorepo configuration, the zip file is uploaded without resolving the symbolic link path.

Config file.

serverless-layers:
  packageManager: pnpm

Directory structure

.
├── README.md
├── node_modules
├── package.json
├── packages
│   ├── admin
│   ├── app
│   │   ├── config
│   │   │   ├── custom.yml
│   │   ├── node_modules
│   │   │   ├── aws-sdk -> ../../../node_modules/.pnpm/[email protected]/node_modules/aws-sdk
│   │   │   ├── body-parser -> ../../../node_modules/.pnpm/[email protected]/node_modules/body-parser
│   │   │   ├── compression -> ../../../node_modules/.pnpm/[email protected]/node_modules/compression
│   │   │   ├── lodash.clonedeep -> ../../../node_modules/.pnpm/[email protected]/node_modules/lodash.clonedeep
│   │   │   ├── lodash.floor -> ../../../node_modules/.pnpm/[email protected]/node_modules/lodash.floor
│   │   │   ├── lodash.update -> ../../../node_modules/.pnpm/[email protected]/node_modules/lodash.update
│   │   │   ├── nanoid -> ../../../node_modules/.pnpm/[email protected]/node_modules/nanoid
│   │   │   └── validator -> ../../../node_modules/.pnpm/[email protected]/node_modules/validator
│   │   ├── package.json
│   │   ├── serverless.yml
│   └── kit
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── tsconfig.json

If I set serverless-layers.packageManager to npm, it works fine, but our project uses pnpm and we cannot change it.

We are aware that pnpm is supported in the Issue. https://github.com/agutoli/serverless-layers/issues/76 Please let me know if there is a workaround or if you plan to support it.

masayuki-tsuji avatar Jan 06 '23 20:01 masayuki-tsuji