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

[BUG][1.3] Plugin build fails with Error: Cannot find module 'fs/promises' #2485

Closed
joshuali925 opened this issue Oct 3, 2022 · 0 comments · Fixed by #2486
Closed

[BUG][1.3] Plugin build fails with Error: Cannot find module 'fs/promises' #2485

joshuali925 opened this issue Oct 3, 2022 · 0 comments · Fixed by #2486
Assignees
Labels
bug Something isn't working v1.3.6

Comments

@joshuali925
Copy link
Member

Describe the bug

A clear and concise description of what the bug is.

opensearch-project/sql#881 (comment)

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repo 1.3 branch
  2. Clone a plugin with 1.3.6.0 version to plugins dir (tried security dashboards and query workbench)
  3. yarn osd bootstrap && yarn build
  4. See error
$ node ../../scripts/plugin_helpers build
Error: Cannot find module 'fs/promises'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Module.Hook._require.Module.require (/home/runner/work/sql/sql/OpenSearch-Dashboards/node_modules/require-in-the-middle/index.js:61:29)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/runner/work/sql/sql/OpenSearch-Dashboards/packages/osd-plugin-helpers/src/tasks/update_versions.ts:7:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:[17](https://github.com/opensearch-project/sql/actions/runs/3176797428/jobs/5176503953#step:9:18))
error Command failed with exit code 1.

Expected behavior
Should not fail

OpenSearch Version
1.3.6

Dashboards Version
1.3.6

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

After reverting 9195654 (#2475), yarn build works again

@joshuali925 joshuali925 added bug Something isn't working untriaged labels Oct 3, 2022
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
opensearch-project#2485

Signed-off-by: Kawika Avilla <[email protected]>
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
opensearch-project#2485

Signed-off-by: Kawika Avilla <[email protected]>
@kavilla kavilla linked a pull request Oct 3, 2022 that will close this issue
8 tasks
kavilla added a commit that referenced this issue Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
#2485

Signed-off-by: Kawika Avilla <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
#2485

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 945cfe6)
kavilla pushed a commit that referenced this issue Oct 3, 2022
In Node v10, there was no dedicated module for fs/promises.
Causing the plugin helpers to fail while building out plugins.

Solved by importing promises from fs then using the desired
methods.

Issue Resolved:
#2485

Signed-off-by: Kawika Avilla <[email protected]>
(cherry picked from commit 945cfe6)
@kavilla kavilla added v1.3.6 and removed untriaged labels Oct 3, 2022
@kavilla kavilla self-assigned this Oct 3, 2022
@kavilla kavilla closed this as completed Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.3.6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants