Comments (6)
Custom plugins reference when using V3
plugins:
../infrastructure/queuer/serverless-fargate-plugin/dist/index.js
When using V4, I had to update, as it's now looking for a package.json. (doco suggests a JS file is fine)
plugins:
./../../infrastructure/queuer/serverless-fargate-plugin
Otherwise I get:
no such file or directory, open '/codebuild/output/srcxxx/src/github.com/xxx/web/node_modules/serverless-lift/package.json'
@richard-stafflink Thanks for the additional info. In V4, we switched to ESM, which likely affected this behavior. Let's see if we can restore it.
from serverless.
For others who are experiencing this problem, please include:
• Your serverless.yml plugin references (we need to see the exact syntax).
• What your directory structure looks like.
from serverless.
Custom plugin resolution code is not the same between versions:
- v3: https://github.com/serverless/serverless/blob/v3/lib/classes/plugin-manager.js#L167
- v4: https://github.com/serverless/serverless/blob/main/lib/classes/plugin-manager.js#L308
Also, it would be handy if the Docs could be updated, as they are not inline with the current implementation.
V4 will use either a package.json file (with main
property) or plugin.js
(https://github.com/serverless/serverless/blob/main/lib/classes/plugin-manager.js#L292)
from serverless.
We're looking into not having the behavior change across versions ATM.
from serverless.
org: orgABC
app: app123
service: 'merchant'
frameworkVersion: '3'
package:
individually: true
provider:
name: aws
runtime: nodejs18.x
stage: ${opt:stage, 'dev'}
region: us-east-1
memorySize: 1024
iam:
role:
statements: ${file(../../common.serverless.yml):statements}
vpc: ${file(../../common.serverless.yml):vpc}
apiGateway:
restApiId:
...
environment:
...
functions:
...
plugins:
- serverless-bundle
- serverless-offline
custom:
bundle:
forceExclude: ${file(../../common.serverless.yml):forceExclude}
ignorePackages: ${file(../../common.serverless.yml):ignorePackages}
cronEnabled:
prod: true
The folder structure
/
/node_modules
/services
/service1
...
serverless.yml
package.json
/service2
...
common.serverless.yml
package.json
from serverless.
We've added a few fixes into this in 4.0.26
which reinstates the loading behavior with v3. Closing unless this is still reported to be a problem
from serverless.
Related Issues (20)
- Ensure Lift works with Serverless Framework V.4 HOT 7
- v3: Error: Cannot use 'publicReadAccess' property on a bucket without allowing bucket-level public access through 'blockPublicAceess' property. HOT 2
- Resolvers error regarding `replace`
- Serverless V4 deployment Error HOT 2
- Serverless command "offline" not found HOT 1
- Unable to set `maximumConcurrency` on `events.sqs` HOT 1
- Dev Mode does not close on the first CTRL+C
- Dev Mode occassionally misses prefixed and colored hyphen
- Documentation is not updated about the v3 HOT 1
- Encountering "Internal Serverless Error" in commands HOT 3
- Menu Overlap Issue in Documentation HOT 2
- Custom resource deployment hangs forever HOT 4
- Show helpful errors when the build type (e.g. `esbuild`) is missing in the `build` section
- `sls info -v` not showing stack outputs HOT 2
- Cannot parse 'serverless.ts' after upgrading to v4 HOT 2
- Missing Package @serverlessinc/sf-core HOT 1
- V4.1.0: Error fetching release: EACCES: permission denied, open /usr/local/lib/node_modules/serverless/node_modules/.bin/serverless-darwin-amd64-0.0.2 HOT 3
- Serverless 4.x doesn't seem to update or work HOT 7
- sls deploy issue
- Make inputTransformers and inputPath available when CfnRule target is event bus HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless.