```✗ sst start Using stage: mish Preparing your SS...
# general
m
Copy code
✗ sst start
Using stage: mish
Preparing your SST app

=======================
 Deploying debug stack
=======================

internal/validators.js:124
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at Module.require (internal/modules/cjs/loader.js:954:3)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:17:17)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'ERR_INVALID_ARG_TYPE'
any idea?
m
What is the underlying code that throws this error?
m
I wish I knew I just typed
sst start
f
Did this happen after updating sst?
m
i think so
f
can i see the version of the serverless-stack dependencies in ur package.json
m
Copy code
"@serverless-stack/cli": "0.65.2",
    "@serverless-stack/resources": "0.65.2",
    "aws-cdk-lib": "2.7.0",
f
hmm we made some changes to the debug stack in 0.65.3.. so this is not related to that
wait.. from the stacktrace it’s reference
/usr/local/lib/node_modules/@serverless-stack/cli/assets/debug-stack/bin/index.js:17
m
yeah when i type sst it uses the globally installed one is that wrong?
how do you use it?
f
ah yeah.. it’s not intented to be used globally (at least for now).. we actually never tested using it globally..
m
so you always type npx sst … ?
f
can you try running
npx sst start
or
yarn sst start
?
yup
m
Copy code
npx sst start
Using stage: mish
Preparing your SST app

=======================
 Deploying debug stack
=======================

/Users/cyber/dev/wedgwood-services/node_modules/aws-cdk-lib/aws-s3/lib/bucket.js:1
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReplaceKey=exports.BucketAccessControl=exports.EventType=exports.BucketEncryption=exports.Bucket=exports.ObjectOwnership=exports.InventoryObjectVersion=exports.InventoryFrequency=exports.InventoryFormat=exports.RedirectProtocol=exports.HttpMethods=exports.BlockPublicAccess=exports.BucketBase=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),os_1=require("os"),path=require("path"),events=require("../../aws-events"),iam=require("../../aws-iam"),kms=require("../../aws-kms"),core_1=require("../../core"),cxapi=require("../../cx-api"),bucket_policy_1=require("./bucket-policy"),notifications_resource_1=require("./notifications-resource"),perms=require("./perms"),s3_generated_1=require("./s3.generated"),util_1=require("./util"),AUTO_DELETE_OBJECTS_RESOURCE_TYPE="Custom::S3AutoDeleteObjects",AUTO_DELETE_OBJECTS_TAG="aws-cdk:auto-delete-objects";class BucketBase extends core_1.Resource{constructor(scope,id,props={}){super(scope,id,props);jsiiDeprecationWarnings.aws_cdk_lib_ResourceProps(props),this.notifications=new notifications_resource_1.BucketNotifications(this,"Notifications",{bucket:this}),this.node.addValidation({validate:()=>{var _e,_f;return(_f=(_e=this.policy)===null||_e===void 0?void 0:_e.document.validateForResourcePolicy())!==null&&_f!==void 0?_f:[]}})}onCloudTrailEvent(id,options={}){var _e,_f;jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_OnCloudTrailBucketEventOptions(options);const rule=new events.Rule(this,id,options);return rule.addTarget(options.target),rule.addEventPattern({source:["aws.s3"],detailType:["AWS API Call via CloudTrail"],detail:{resources:{ARN:(_f=(_e=options.paths)===null||_e===void 0?void 0:_e.map(p=>this.arnForObjects(p)))!==null&&_f!==void 0?_f:[this.bucketArn]}}}),rule}onCloudTrailPutObject(id,options={}){jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_OnCloudTrailBucketEventOptions(options);const rule=this.onCloudTrailEvent(id,options);return rule.addEventPattern({detail:{eventName:["PutObject"]}}),rule}onCloudTrailWriteObject(id,options={}){jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_OnCloudTrailBucketEventOptions(options);const rule=this.onCloudTrailEvent(id,options);return rule.addEventPattern({detail:{eventName:["CompleteMultipartUpload","CopyObject","PutObject"],requestParameters:{bucketName:[this.bucketName],key:options.paths}}}),rule}addToResourcePolicy(permission){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_PolicyStatement(permission),!this.policy&&this.autoCreatePolicy&&(this.policy=new bucket_policy_1.BucketPolicy(this,"Policy",{bucket:this})),this.policy?(this.policy.document.addStatements(permission),{statementAdded:!0,policyDependable:this.policy}):{statementAdded:!1}}urlForObject(key){const stack=core_1.Stack.of(this),prefix=`<https://s3>.${this.env.region}.${stack.urlSuffix}/`;return typeof key!="string"?this.urlJoin(prefix,this.bucketName):this.urlJoin(prefix,this.bucketName,key)}transferAccelerationUrlForObject(key,options){jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_TransferAccelerationUrlOptions(options);const dualStack=(options==null?void 0:options.dualStack)?".dualstack":"",prefix=`https://${this.bucketName}.s3-accelerate${dualStack}.<http://amazonaws.com/`;return|amazonaws.com/`;return> typeof key!="string"?this.urlJoin(prefix):this.urlJoin(prefix,key)}virtualHostedUrlForObject(key,options){var _e;jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_VirtualHostedStyleUrlOptions(options);const prefix=`https://${((_e=options==null?void 0:options.regional)!==null&&_e!==void 0?_e:!0)?this.bucketRegionalDomainName:this.bucketDomainName}`;return typeof key!="string"?prefix:this.urlJoin(prefix,key)}s3UrlForObject(key){const prefix="s3://";return typeof key!="string"?this.urlJoin(prefix,this.bucketName):this.urlJoin(prefix,this.bucketName,key)}arnForObjects(keyPattern){return`${this.bucketArn}/${keyPattern}`}grantRead(identity,objectsKeyPattern="*"){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity),this.grant(identity,perms.BUCKET_READ_ACTIONS,perms.KEY_READ_ACTIONS,this.bucketArn,this.arnForObjects(objectsKeyPattern))}grantWrite(identity,objectsKeyPattern="*"){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity),this.grant(identity,this.writeActions,perms.KEY_WRITE_ACTIONS,this.bucketArn,this.arnForObjects(objectsKeyPattern))}grantPut(identity,objectsKeyPattern="*"){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity),this.grant(identity,this.putActions,perms.KEY_WRITE_ACTIONS,this.arnForObjects(objectsKeyPattern))}grantPutAcl(identity,objectsKeyPattern="*"){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity),this.grant(identity,perms.BUCKET_PUT_ACL_ACTIONS,[],this.arnForObjects(objectsKeyPattern))}grantDelete(identity,objectsKeyPattern="*"){return jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity),this.grant(identity,perms.BUCKET_DELETE_ACTIONS,[],this.arnForObjects(objectsKeyPattern))}grantReadWrite(identity,objectsKeyPattern="*"){jsiiDeprecationWarnings.aws_cdk_lib_aws_iam_IGrantable(identity);const bucketActions=perms.BUCKET_READ_ACTIONS.concat(this.writeActions),keyActions=[...new Set([...perms.KEY_READ_ACTIONS,...perms.KEY_WRITE_ACTIONS])];return this.grant(identity,bucketActions,keyActions,this.bucketArn,this.arnForObjects(objectsKeyPattern))}grantPublicAccess(keyPrefix="*",...allowedActions){if(this.disallowPublicAccess)throw new Error("Cannot grant public access when 'blockPublicPolicy' is enabled");return allowedActions=allowedActions.length>0?allowedActions:["s3:GetObject"],iam.Grant.addToPrincipalOrResource({actions:allowedActions,resourceArns:[this.arnForObjects(keyPrefix)],grantee:new iam.AnyPrincipal,resource:this})}addEventNotification(event,dest,...filters){jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_EventType(event),jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_IBucketNotificationDestination(dest),jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_NotificationKeyFilter(filters),this.notifications.addNotification(event,dest,...filters)}addObjectCreatedNotification(dest,...filters){return jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_IBucketNotificationDestination(dest),jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_NotificationKeyFilter(filters),this.addEventNotification(EventType.OBJECT_CREATED,dest,...filters)}addObjectRemovedNotification(dest,...filters){return jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_IBucketNotificationDestination(dest),jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_NotificationKeyFilter(filters),this.addEventNotification(EventType.OBJECT_REMOVED,dest,...filters)}enableEventBridgeNotification(){this.notifications.enableEventBridgeNotification()}get writeActions(){return[...perms.BUCKET_DELETE_ACTIONS,...this.putActions]}get putActions(){return core_1.FeatureFlags.of(this).isEnabled(cxapi.S3_GRANT_WRITE_WITHOUT_ACL)?perms.BUCKET_PUT_ACTIONS:perms.LEGACY_BUCKET_PUT_ACTIONS}urlJoin(...components){return components.reduce((result,component)=>(result.endsWith("/")&&(result=result.slice(0,-1)),component.startsWith("/")&&(component=component.slice(1)),`${result}/${component}`))}grant(grantee,bucketActions,keyActions,resourceArn,...otherResourceArns){const resources=[resourceArn,...otherResourceArns],ret=iam.Grant.addToPrincipalOrResource({grantee,actions:bucketActions,resourceArns:resources,resource:this});return this.encryptionKey&&keyActions&&keyActions.length!==0&&this.encryptionKey.grant(grantee,...keyActions),ret}}exports.BucketBase=BucketBase,_a=JSII_RTTI_SYMBOL_1,BucketBase[_a]={fqn:"aws-cdk-lib.aws_s3.BucketBase",version:"2.7.0"};class BlockPublicAccess{constructor(options){jsiiDeprecationWarnings.aws_cdk_lib_aws_s3_BlockPublicAccessOptions(options),this.blockPublicAcls=options.blockPublicAcls,this.blockPublicPolicy=options.blockPublicPolicy,this.ignorePublicAcls=options.ignorePublicAcls,this.restrictPublicBuckets=options.restrictPublicBuckets}}exports.BlockPublicAccess=BlockPublicAccess,_b=JSII_RTTI_SYMBOL_1,BlockPublicAccess[_b]={fqn:"aws-cdk-lib.aws_s3.BlockPublicAccess",version:"2.7.0"},BloThere was an error synthesizing your app.
f
hmm it seems to be related to esm with the aws-cdk-lib/aws-s3 package
Let me see if @thdxr has any idea about this
j
Did we look at this issue @Frank @thdxr?
t
this is without invoking a function?
m
just
start
f
Hi @Mischa Spiegelmock, did you get a chance to get around this issue?
If you are still block, can you check if u have a
cdk.context.json
file at the root of ur SST app? If so, try removing it and run
sst start
again?
m
updated sst and it seems to work so thx!