-
Notifications
You must be signed in to change notification settings - Fork 227
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
Error EPERM: operation not permitted, version 1.1.9 #170
Comments
I am unable to reproduce this one 😞 Are you using webpack? There's another issue surrounding webpack users at the moment which may be related. Have you tried removing the |
I have the same problem, on macOS as well. Appending debug log here. `SLS_DEBUG=* npx sls deploy --stage prod -v Error -------------------------------------------------- EPERM: operation not permitted, unlink '/Users/up4/api/.build/node_modules'
Stack Trace -------------------------------------------- Error: EPERM: operation not permitted, unlink '/Users/up4/api/.build/node_modules' Get Support -------------------------------------------- Your Environment Information --------------------------- |
And reverting from 1.1.9 to 1.1.7 worked for me as well. |
We are having to problem aswell... no WebPack and on Windows... |
I honestly don't think serverless-plugin-typescript is to "blame" for this. I think something in the underlying fs-package messes up symlinks... I've managed to fix this error by deleting the |
@ThomasEg I tend to agree, I've had a heap of issues getting symlink code to work across *nix and Windows. Windows doesn't allow symlinks without administrator level permissions (ref) and there are already a heap of flaky workarounds for exactly that problem (likely causing this issue). Making matters worse is the fact that this plugin tries to support webpack configurations which change the expected output directory/file on top of TypeScript ones (aside: why do people feel they need to use this plugin in addition to webpack + ts-loader or similar?), I'm beginning to think that the scope of this plugin is far too large to be reasonably maintainable for just one person. Perhaps @divyenduz can weigh in here? |
I have, multiple times, tried to move away from this plugin to webpack, due to issues like this one... but i cannot get a satisfying result. Either i drown in strange runtime-errors i cannot track down or huuuuuuge compiletime... |
Downgrading to v1.1.7 worked whilst v1.1.8 (and v1.1.9) errored. I noticed that with v1.1.7, running Using v1.1.8 (or v1.1.9) it's no longer a symlink. Something in the v1.1.8 release broke this. |
Same issue here. Downgrading to v1.1.7 worked... |
folder permissions issue when building: $ sudo rm -rf .build/ |
Downgraded to v1.1.7. What a miserable day for productivity this was. Ensuring adequate permissions for local user on node-modules, .build, .serverless had not affect for me. |
Downgraded to 1.1.7 too, working fine |
Constantly having this issue, must remove the emit directory This usually happens upon build time exceptions, user interrupts during compilation also triggers this issue. |
@vicary still having an issue
fixing when downgraded to v1.1.7 |
I'm getting
when I pin version |
downgrading to 1.1.7 worked for me, deleting .build and .serverless didn't help |
FWIW, my issue was that I needed to delete my .build folder before running the script. |
Getting the same error, deleting |
We had a similar issue in |
I had a local dependency like:
The error |
same w/ me. i have a local file linked to the app via package.json. reverting to 1.1.7 worked. i'm on a windows machine Versions |
Getting this issue as well. serverless-plugin-typescript 1.1.9 |
My serverless-plugin-typescript version is 1.1.9 |
Getting same error with UPDATE Maybe the |
I recently published a new version from my forked repo on npm: @kingdarboja/serverless-plugin-typescript Please test it as I merged several PRs from this repo in order to solve several issues, including this one. Cheers! |
Running this command was my mistake.npm config set prefix /usr/local Path /usr/local is not for windows. This command changed the prefix variable at 'C:\Program Files (x86)\Git\local' To access and make a change to this directory I need to run my cmd as administrator. So I did:
|
same bug here |
Deleting |
@D-Pagey solution worked for me |
Still getting this issue on 2.1.0 |
version |
Came back months later when upgrading to |
I've noticed that this issue sometimes happens if you've CTRL-C killed a deploy (for whatever reason) while it's in the middle of running. Left in an inconsistent state perhaps? As suggested the solution for me was to delete HTH |
Still happening with |
@raiseandfall More details: |
The proposed PR #212 suggests just using |
… remove node_modules when packaging serverless project
Still getting this issue with |
i have same issue |
Still getting this issue with 2.1.1 of |
Same issue here. |
I migrated to next.js just to solve this issue, but I do not regret it :D |
Also getting the issue with newest ^2.1.2 of serverless-plugin-typescript |
In my case, the cause was I am using prisma and was following this document as written, when an error occurred. package:
patterns:
# - '!node_modules/.prisma/client/libquery_engine-*'
# - 'node_modules/.prisma/client/libquery_engine-rhel-*'
- '!node_modules/prisma/libquery_engine-*'
- '!node_modules/@prisma/engines/**' |
I have the same issue. Only thing that makes newer versions to work is to comment out |
I am also using Prisma and @kobayashiharuto 's answer fixed the error, but it will obviously increases the bundle size.
and moving the Prisma excluded paths under every single function using Prisma:
Docs reference here. |
I mixed up npm and yarn.. Removed |
This worked for me. |
Downgrading to |
As mentioned downgrading to |
When I tried to run 'sls deploy', the following error is shown:
EPERM: operation not permitted, unlink '/Users/sofyan.ahmad/Projects/project-name/.build/node_modules'
The error is gone when I reverted back to version 1.1.7
The text was updated successfully, but these errors were encountered: