-
Notifications
You must be signed in to change notification settings - Fork 266
Closed
Description
I recently upgraded to the latest verision 1.x from 0.x. Since then unpublish command is crashing
node-pre-gyp ERR! UNCAUGHT EXCEPTION
node-pre-gyp ERR! stack TypeError: Cannot read property 'slice' of undefined
node-pre-gyp ERR! stack at Object.module.exports.detect (/home/runner/work/lexactivator-js/lexactivator-js/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:21:29)
node-pre-gyp ERR! stack at unpublish (/home/runner/work/lexactivator-js/lexactivator-js/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js:18:12)
node-pre-gyp ERR! stack at Object.self.commands.<computed> [as unpublish] (/home/runner/work/lexactivator-js/lexactivator-js/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:81:37)
node-pre-gyp ERR! stack at run (/home/runner/work/lexactivator-js/lexactivator-js/node_modules/@mapbox/node-pre-gyp/lib/main.js:81:30)
node-pre-gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:79:11)
node-pre-gyp ERR! System Linux 4.15.0-1108-azure
node-pre-gyp ERR! command "/opt/hostedtoolcache/node/12.21.0/x64/bin/node" "/home/runner/work/lexactivator-js/lexactivator-js/node_modules/.bin/node-pre-gyp" "package" "unpublish" "publish" "info"
I debugged and in your code it crashes at:
if (!config.region) {
const region = parts[1].slice(1).split('.')[0]; // this line causes the crash
if (region === 'amazonaws') {
config.region = 'us-east-1';
} else {
config.region = region;
}
}
Metadata
Metadata
Assignees
Labels
No labels