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

Current version was improperly published #13

Open
dpopp07 opened this issue Jun 1, 2023 · 0 comments
Open

Current version was improperly published #13

dpopp07 opened this issue Jun 1, 2023 · 0 comments
Assignees

Comments

@dpopp07
Copy link
Member

dpopp07 commented Jun 1, 2023

Describe the bug
A clear and concise description of what the bug is.

When I install this SDK, the published folder structure is improperly formatted and doesn't match the README documentation in terms of how it can be used. There are a couple of issues; I'll capture both individually.

  1. The published file structure is wrong. The package should be published from the dist directory but it seems to have been published from the root directory and includes the dist directory. See my screenshot of the published file structure below. It also includes a bunch of other files and such that do not belong in the published package like config files, etc.

  2. The docs in the README do not match the Cloud docs. The Cloud docs at least seem correct for the currently published structure. Once the structure is fixed, however, the docs should be made to match. The README is more correct in terms of what it should be.

For example, the README gives the import path: @ibm-cloud/ibm-code-engine-sdk/code-engine/v2.

The Cloud docs show the import as import CodeEngineV2 from "@ibm-cloud/ibm-code-engine-sdk/dist/code-engine/v2";

To Reproduce
List the steps that can be used to demonstrate the bug. Include the name of the service and operation that you're trying to invoke, if applicable. Be sure to describe any relevant info regarding parameter values used with your API invocation.

  1. Create a new test directory and install the SDK
$ mkdir node-code-engine-test
$ npm init -y
$ npm install "@ibm-cloud/ibm-code-engine-sdk"
  1. Create a file, index.js, with the following code:
const SchematicsV1 = require('@ibm-cloud/ibm-code-engine-sdk/code-engine/v2'); // from README
const { NoAuthAuthenticator } = require('@ibm-cloud/ibm-code-engine-sdk/auth');

const authenticator = new NoAuthAuthenticator();

const service = new SchematicsV1({
    authenticator,
});
  1. Run the code
$ node index.js

Expected behavior
A clear and concise description of what you expected to happen.

The code should run cleanly, with no errors or output. Instead, there is an exception:
Error: Cannot find module '@ibm-cloud/ibm-code-engine-sdk/code-engine/v2'

Screenshots
If applicable, add screenshots to help explain your problem.
code-engine-package

Must gather (please complete the following information):

  • SDK Version 3.1.0
  • Node Version 16.16.0

Additional context
Add any other context about the problem here.
Were you able to avoid the problem by changing your application code slightly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants