Replies: 4 comments
-
So I was able to create a similar error with this code: import { Tools } from "@halcyontech/vscode-ibmi-types/api/Tools";
Tools.db2Parse('SELECT * FROM QIWS.QCUSTCDT'); ERROR in ./src/base.ts 3:0-65
Module not found: Error: Can't resolve '@halcyontech/vscode-ibmi-types/api/Tools' in '/Users/barry/Repos/vscode-db2i/src'
resolve '@halcyontech/vscode-ibmi-types/api/Tools' in '/Users/barry/Repos/vscode-db2i/src'
Parsed request is a module
using description file: /Users/barry/Repos/vscode-db2i/package.json (relative path: ./src)
resolve as module
/Users/barry/Repos/vscode-db2i/src/node_modules doesn't exist or is not a directory
looking for modules in /Users/barry/Repos/vscode-db2i/node_modules
existing directory /Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types
using description file: /Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/package.json (relative path: .)
using description file: /Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/package.json (relative path: ./api/Tools)
no extension
/Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/api/Tools doesn't exist
.ts
/Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/api/Tools.ts doesn't exist
.js
/Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/api/Tools.js doesn't exist
.svg
/Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/api/Tools.svg doesn't exist
as directory
/Users/barry/Repos/vscode-db2i/node_modules/@halcyontech/vscode-ibmi-types/api/Tools doesn't exist
/Users/barry/Repos/node_modules doesn't exist or is not a directory
/Users/barry/node_modules doesn't exist or is not a directory
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
@ ./src/extension.ts 5:0-47 25:2-10 67:19-30
webpack 5.97.1 compiled with 1 error in 586 ms That's because the import is really just a type definition, so you shouldn't be referencing them in your executing code, only as types. import type { Tools } from "@halcyontech/vscode-ibmi-types/api/Tools"; Then, everything we offer is exported from our extension:
![]() ![]() I hope this was helpful. I see a bug where we aren't exporting makeid anymore, but I will get on this right away and release 2.15.3 with it. |
Beta Was this translation helpful? Give feedback.
-
Thanks that has gotten me over that hump. I am running into another issue an dI hope you are willing to help with this one. getMemberInfo() is returning the MSGID CPFA0A9, what looks like every time, its run. The base command Output channel results from
Output channel results from my extension command
They look essentially the same, however, the results of running getMemberInfo() from my extension command rsults in an undefined variable. This is how I redefined the function |
Beta Was this translation helpful? Give feedback.
-
Okay so I missed the condition in |
Beta Was this translation helpful? Give feedback.
-
Thanks for the assist again! |
Beta Was this translation helpful? Give feedback.
-
Up migrated up to latest Code4i (2.15.x). My side project based on Code4i started reporting errors. I decided to update these projects to the latest Code4i types to 2.15.x. Now building or debugging fails with errors...
I use other types such as
@halcyontech/vscode-ibmi-types
,@halcyontech/vscode-ibmi-types/Instance
and@halcyontech/vscode-ibmi-types/api/IBMi
.Any advice how to resolve this issue is welcome.
elements I am using from
Tools
are...Tools.DB2Row
for remappingCode4i.getContent().getTable(
Tools.makeid(length);
Thanks, Matt
Beta Was this translation helpful? Give feedback.
All reactions