Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crawlDirectory function in @webiny/cli-plugin-deploy-pulumi/utils not exported correctly #3979

Open
kwang1083 opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@kwang1083
Copy link

kwang1083 commented Mar 6, 2024

Version

5.29

Operating System

Linux

Browser

No response

What are the steps to reproduce this bug?

No response

What is the expected behavior?

We are using webiny to deploy our React site. When running yarn deploy, we expect to see a successful deploy.

What do you see instead?

At the end of yarn deploy call, webiny produces an error saying "An error occured while processing hook-after-deploy-admin" plugin: crawlDirectory is not a function".

Additional information

We are able to achieve a successful deploy by going into node modules and adding in the import and export for crawlDirectory back into packages/cli-plugin-deploy-pulumi/utils/index.js. The crawlDirectory's export was removed in this change 888a533#diff-8d9f37b92986802a2956ed49c7b8c864325dd2ade09b91d6313ad104f5dce707 for v5.29.

const createProjectApplicationWorkspace = require("./createProjectApplicationWorkspace");
const getPulumi = require("./getPulumi");
const getStackOutput = require("./getStackOutput");
const createPulumiCommand = require("./createPulumiCommand");
const loadEnvVariables = require("./loadEnvVariables");
const processHooks = require("./processHooks");
const runHook = require("./runHook");
const notify = require("./notify");
const login = require("./login");
const mapStackOutput = require("./mapStackOutput");
const getRandomColorForString = require("./getRandomColorForString");
const crawlDirectory = require("./crawlDirectory") //ADDED LINE HERE

module.exports = {
crawlDirectory, //ADDED LINE HERE
getPulumi,
getStackOutput,
createPulumiCommand,
loadEnvVariables,
mapStackOutput,
processHooks,
runHook,
notify,
login,
getRandomColorForString,
createProjectApplicationWorkspace
};

Possible solution

What was the reason that the export to crawlDirectory was removed? At the moment utils/aws/uploadFolderToS3 still calls the crawlDirectory function, so it seems to be still in use, but uploadFolderToS3 is unable to find it without it being exported. Is it possible to add in this export using the solution above in v5.29 and up?

Thank you so much!

@kwang1083 kwang1083 added the bug label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant