@srchase thanks for clarification.
I cloned the repo locally to C:\localdev\aws-sdk-js-v3
If i do the following:
C:\localdev\aws-sdk-js-v3> npm link
C:\localdev\myproject> npm link aws-sdk-js-v3
C:\localdev\myproject> npm install @aws-sdk/client-cognito-identity-browser
not the local package gets installed.
Can you tell me what to do in order to install the local version in the namespace @aws-sdk?
@mlclay Thanks for your tip! i tried it out with one of the 2 packages i need. In this case client-lambda-browser.
client-lambda-browser $ npm link
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated @types/handlebars@4.1.0: This is a stub types definition. handlebars provides its own type definitions, so you do not need this installed.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@aws-sdk%2fclient-documentation-generator - Not found
npm ERR! 404
npm ERR! 404 '@aws-sdk/client-documentation-generator@^0.1.0-preview.2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'client-lambda-browser'
Do i really need to link the dependencies beetween the packages by hand?
npm-link-shared
module and it was created because of the issue described here. Sounds similar to your issue so it might help? https://60devs.com/simple-way-to-manage-local-node-module-using-npm-link.html
@mlclay i tried it with npm-link-shared with different options but got the same error "ignored due to missing or erroneous package.json" all the time:
npm-link-shared /localdev/aws-sdk-js-v3 /localdev/myproject @aws-sdk/client-cognito-identity-browser --include-peer —include-dev
Will be installing modules from /localdev/aws-sdk-js-v3/
to /localdev/myproject/
...
Restricted to the following modules [ '@aws-sdk/client-cognito-identity-browser' ]/localdev/aws-sdk-js-v3/clients
ignored due to missing or erroneous package.json/localdev/aws-sdk-js-v3/models
ignored due to missing or erroneous package.json/localdev/aws-sdk-js-v3/node_modules
ignored due to missing or erroneous package.json/localdev/aws-sdk-js-v3/packages
ignored due to missing or erroneous package.json/localdev/aws-sdk-js-v3/scripts
ignored due to missing or erroneous package.json
npm-link-shared /localdev/aws-sdk-js-v3/clients/browser /localdev/myproject client-cognito-identity-browser --include-peer --include-dev
Hi Lucas,
thanks for asking. Unfortunately not.
I tried the command you wrote which looked promising:
Will be installing modules from /localdev/aws-sdk-js-v3/clients/browser/
to /localdev/myproject/
...
Restricted to the following modules [ 'client-cognito-identity-browser' ]
But as i installed the "client-cognito-identity-browser" with the following command, it turned out that the version from npm (preview.2) and not the local version (preview.5) was installed.
npm i @aws-sdk/client-cognito-identity-browser -s
Do i actually need to use the scope "@aws-sdk" while installing the locally linked module?
I don't get how to differentiate between the remote npm version and the local version ^^
Any help very appreciated :)
@aws-js-sdk-v3-prerelease
. The specific package you need has a few versions published under that scope on npmjs so you may be able to skip the npm-link stuff completely
npm i -S @aws-js-sdk-v3-prerelease/client-cognito-identity-browser@0.1.0-preview.5
Hi Lucas, thank you very much. You're right, i only want to use the most current version of "client-cognito-identity-browser" and "client-lambda-browser".
With your provided command i was able to install the current version of "client-cognito-identity-browser" but not of "client-lambda-browser".
This was the error i got: 404 Not Found: @aws-js-sdk-v3-prerelease/client-lambda-browser@0.1.0-preview.1
In the meanwhile I'm ready to give up ;) I can't understand that there is not a straight forward way to build the sdk from source which is described somewhere ^^
node-ses
package, which is a very focused Node module that just does mail sending with AWS SES. The module is aging now and could stand to be updated with a promise-based API. A fork has added promise support, but lacks some of the latest features we've added. I'm definitely in favor of the direction the SDK is taking to allow installing and just a single module. The one big place for improvement is with the documentation. You can do better. If you check out the node-ses
docs, it's a really good user experience. You can quickly find an example and the documentation for the key methods.
const elasticBeanstalk = new CloudFrontClient({
region: 'us-east-1',
});
export const createInvalidation = async () => {
const params = {
DistributionId: DISTRIBUTION_ID,
InvalidationBatch: {
CallerReference: String(new Date().getTime()),
Paths: {
Quantity: 1,
Items: ['/index.html'],
},
},
};
const createInvalidationCommand = new CreateInvalidationCommand(params);
await elasticBeanstalk.send(createInvalidationCommand);
};
@aws-sdk/credential-provider-cognito-identity