Skip to content

Bugfix: Process stuck at Excluding development dependencies... #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

piotr-cz
Copy link
Contributor

After installing this plugin the sls package command gets stuck at the Excluding development dependencies... state.

This happens for both my project and example application bundled with this repo:

> sls package
[layer-manager] Invoking layer-manager plugin
+ [email protected]
added 2 packages from 3 contributors in 0.538s
[layer-manager] Installed 1 layers
Serverless: Packaging service...
Serverless: Excluding development dependencies...

I'm using Windows OS and assuming that it happens only on this OS as there are no similiar bug reports.

I found out that the problem may be due to the working directory where npm install is being run.

When it's executed with the --prefix option, npm adds a symbolic link inside the layers node_modules that points to the service directory at it seems that this is where the process gets stuck:

- my-lib
  - nodejs
    - node_modules
      - example-layer-service (symlink)
      - lodash
    package.json
    package-lock.json
hello.js
package.json
package-lock.json
serverless.yml

When switching to cwd instead of --prefix, it doesn't get stuck anymore.

@henhal
Copy link
Owner

henhal commented Jan 21, 2020

Thanks for the PR, @piotr-cz!
I had indeed not tested on Windows. This change makes perfect sense and I've verified that it still works as intended also on Linux.
I will merge and release 1.0.4 shortly.

@henhal henhal merged commit 4d34a1f into henhal:master Jan 21, 2020
@piotr-cz piotr-cz deleted the bugfix/stuck-at-excluding-dev-deps branch January 21, 2020 08:56
@piotr-cz
Copy link
Contributor Author

Just a note: as npm install is executed in target directory, it's also possible to use dedicated .npmrc file there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants