Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

packaging typescript chaincode fails #2193

Closed
2 tasks done
knarz opened this issue Apr 16, 2020 · 13 comments
Closed
2 tasks done

packaging typescript chaincode fails #2193

knarz opened this issue Apr 16, 2020 · 13 comments
Labels
bug Something isn't working external sev2 status This issue will be shown on status page

Comments

@knarz
Copy link

knarz commented Apr 16, 2020

The chaincode is compiled properly, i.e. shows up in the dist/ directory but not actually packaged. No error are generated.

Expected Behavior

Packaged smart contract should show up in the »smart contracts« pane.

Actual Behavior

When using typescript as the language for the chaincode, nothing happens.

When using javascript as the language for the chaincode, the package shows up.

Possible Fix

N/A

Steps to Reproduce

  1. Go to Smart contracts pane
  2. Select »Create New Project«
  3. Create new CRUD project using typescript
  4. Project skeleton is created
  5. Open new crud project
  6. Try to »Package open project«

Existing issues

N/A

Log File

Logfiles are error free. Only says [INFO] packageSmartContract

Your Environment

  • IBM Blockchain Platform Extension Version: 1.0.26, 1.0.25, 1.0.24
  • Visual Studio Code version: 1.44.1
  • Environment name and version (e.g. Node.js v8.12.0, npm v6.4.1): node v10.19.0, npm 6.13.4
  • Operating System and version: Darwin x64 19.4.0
@knarz knarz changed the title package typescript chaincode packaging typescript chaincode fails Apr 16, 2020
@Jakeeyturner Jakeeyturner added the bug Something isn't working label Apr 20, 2020
@cazfletch cazfletch added status This issue will be shown on status page sev2 labels Apr 21, 2020
@droopygit
Copy link

I have the same problem #2020. And when I try to "Package Open Project" I have this error:

[ERROR] TypeError: Cannot read property 'fsPath' of undefined

@mrchar
Copy link

mrchar commented Apr 22, 2020

I have the same problem, when I try to "Package Open Project" a sample go CRUE contract project, I get fail log:

[2020/4/22 下午12:49:28] [INFO] packageSmartContract
[2020/4/22 下午12:49:28] [ERROR] TypeError: Cannot read property 'fsPath' of undefined

@johndacost
Copy link

johndacost commented Apr 22, 2020

[Workaround] Pending the current fix... you can revert to version 1.39 of vscode which works well for me.

@droopygit
Copy link

I confirm your workaround @johndacost . It also solves the 'fsPath' problem.
Thanks!

@Jakeeyturner
Copy link
Contributor

I could recreate the packaging failing to do anything after compiling the TypeScript, using VS Code 1.44.x. I'm unable to recreate the [ERROR] TypeError: Cannot read property 'fsPath' of undefined error though.

As @johndacost mentioned, a workaround is to downgrade VS Code to a previous version such as 1.39 - until we figure out what has changed in VS Code and what changes we can make in the extension.

Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Apr 23, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
Jakeeyturner added a commit to Jakeeyturner/blockchain-vscode-extension that referenced this issue Apr 23, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
mergify bot pushed a commit that referenced this issue Apr 23, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
(cherry picked from commit 514b1a5)
cazfletch pushed a commit that referenced this issue Apr 23, 2020
Signed-off-by: Jake Turner <jaketurner25@live.com>
(cherry picked from commit 514b1a5)

Co-authored-by: Jake <10009752+Jakeeyturner@users.noreply.github.com>
@Jakeeyturner
Copy link
Contributor

A fix went in for this in our v1.0.27 release yesterday.

As I've been unable to verify the [ERROR] TypeError: Cannot read property 'fsPath' of undefined issue, please let me know if this still occurs!

Thanks,
Jake

@mrchar
Copy link

mrchar commented Apr 24, 2020

@Jakeeyturner Hello, I have updated to v1.0.27, and when click the package open project it still occurs the error:

[ERROR] TypeError: Cannot read property 'fsPath' of undefined

@knarz
Copy link
Author

knarz commented Apr 24, 2020

My issue seems to be fixed, thanks Jake

@johndacost
Copy link

A fix went in for this in our v1.0.27 release yesterday.

As I've been unable to verify the [ERROR] TypeError: Cannot read property 'fsPath' of undefined issue, please let me know if this still occurs!

Thanks,
Jake

Works fine, Thanks !

@hbksagar
Copy link

hbksagar commented Apr 26, 2020

@Jakeeyturner I am facing the same issue. I have the latest VSC (1.44.2) and IBM Blockchain platform extension (1.0.27).

Additional Info: I am trying to create the package using WSL2 with Ubuntu 18.04.

Update: After downgrading VSC to version 1.39.2, everything worked as expected.

@droopygit
Copy link

The 1.0.27 version doesn't resolve for me the fsPath problem nor the original packaging one.

@Jakeeyturner
Copy link
Contributor

Jakeeyturner commented Apr 28, 2020

@droopygit @mrchar

Please could you provide some information on your operating system, VS Code version, extension version, contract language and any prompts you clicked, then add it to this issue --> #2243

Thanks.

@cazfletch
Copy link
Contributor

@hbksagar when you say you "Additional Info: I am trying to create the package using WSL2 with Ubuntu 18.04." Does that mean you are using remote development in vscode?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working external sev2 status This issue will be shown on status page
Projects
None yet
Development

No branches or pull requests

8 participants