Comments (5)
Hello @jchirschy,
I am not able to reproduce your issue with following code:
package.json
{
"name": "hello_world",
"version": "1.0.0",
"main": "app.js",
"dependencies": {
"axios": "^0.18.0"
},
"scripts": {
"test": "mocha tests/unit/"
},
"optionalDependencies": {
"jshint": "2.10.3"
},
"devDependencies": {
"chai": "^4.2.0",
"mocha": "^6.1.4"
}
}
node_modules folder
$ /bin/ls .aws-sam/build/HelloWorldFunction/node_modules
axios concat-map fs.realpath is-buffer ms wrappy
balanced-match debug inflight lodash once
brace-expansion follow-redirects inherits minimatch path-is-absolute
As you can see optionalDependency jshint
is missing from node_modules
folder.
I am using npm 6.9.0
with node 10.16.3
. Can you please share more details about what you are seeing and what you expect?
Thanks
Tarun
from aws-lambda-builders.
Hello @c2tarun,
Thanks for your help.
Have you tried with optionalDependencies
only ?
I typically use Lambda layers 'linked' to AWS lambda functions where there is no node_modules
folder necessary for the Lambda functions.
from aws-lambda-builders.
Hello,
I confirm that optional dependencies are still added with the following configuration :
- Node v12.18.2
- SAM CLI, version 1.2.0
It works fine with :
- Node v8.9.4
- SAM CLI, version 1.2.0
Any idea ?
from aws-lambda-builders.
Please pay attention to your NPM versions.
While optional=false
is expected to work with NPM 6, it was removed in NPM 7 where you should use omit=optional
instead.
See https://docs.npmjs.com/cli/v7/using-npm/config#omit
from aws-lambda-builders.
Thank you @projected1 for sharing the info.
@jchirschy please open a new issue if you still encounter the issue. Closing due to unable to reproduce it and it is too outdated.
from aws-lambda-builders.
Related Issues (20)
- SAM build continually updates Lambda Tools HOT 3
- python arm build issue still failing in some cases HOT 27
- Golang with confluent Kafka library Sam build issue. HOT 4
- sam build obscures pip ssl errors HOT 5
- Lambda application return error with libjvm.so, for a node js application HOT 6
- sam build doesn't support file as CodeUri HOT 5
- Bug: recursively copies artifact dir when it's in source dir HOT 5
- SAM build failed in sam cli using python 3.9. HOT 3
- How to make `sam` hold my SSH keys so `sam build` can download dependencies from my private repository? HOT 4
- [Announcement] Deprecating AWS Lambda Builders on python3.6 HOT 1
- Feature request: Add support for ES Modules with esbuild. HOT 4
- Feature request: Support packaging resource files with workflow HOT 7
- Add support for SourcesContent option in esbuild builds HOT 2
- Bug: UnsupportedPackageError when tests run under setuptools 66+ HOT 1
- [Announcement] .NET Core 3.1 Runtime Deprecation
- Using pip 23.1 produces invalid deployment file when package references other local packages HOT 1
- Feature request: Allow ignoring dependencies when building with python pip HOT 2
- Bug: sam build throws error with python packages installed with git+https url HOT 3
- Bug: No message from the Maven's stderr in the sam output logs HOT 1
- Feature request: Include/Exclude Interface for AWS Lambda Builders HOT 3
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 aws-lambda-builders.