Open iuaj7 opened 4 years ago
Hi, @iuaj7, can you create a template repo with this error?
@MrRefactoring I uploaded the files to "iuaj7/HelloSharepointJira" without the node_modules directory
Sorry, but there are no files. Check it one more time :)
Try import * as JiraClient from 'jira-connector';
. Let me know if this helps.
With the modified import statement the "jira = new JiraClient(..." gives me the following error message:
[ts] Cannot use 'new' with an expression whose type lacks a call or construct signature.
Found something. Sharepoint Developer Framework SPFx uses an older Typescript version "[10:44:26] [typescript] TypeScript version: 2.2.2". Seems that SPFx has some internal dependencies and cannot switch to the latest tsc version.
Found something. Sharepoint Developer Framework SPFx uses an older Typescript version "[10:44:26] [typescript] TypeScript version: 2.2.2". Seems that SPFx has some internal dependencies and cannot switch to the latest tsc version.
Good job @iuaj7. Can you give me PR to fix it?
@MrRefactoring Sorry, but I do not have a solution for the problem. I just identified a possible reason why it is not working. It seems to be a version conflict with the Sharepoint "package.json" dependencies. The problem is similar to using "jquery" with SPFx: "https://thechriskent.com/tag/typescript/"
Any updates on this? I ran into a similar error and can´t use the JiraConnector in my SPFx project. Here´s my error message:
Error - [webpack] 'dist': ./node_modules/jira-connector/api/auth.js Module not found: Error: Can't resolve 'fs' in 'C:/GIT/MyProject/SPFx/MyWebPart/node_modules/jira-connector/api' resolve 'fs' in 'C:/GIT/MyProject/SPFx/MyWebPart/node_modules/jira-connector/api'
Any updates on this? I ran into a similar error and can´t use the JiraConnector in my SPFx project. Here´s my error message:
Error - [webpack] 'dist': ./node_modules/jira-connector/api/auth.js Module not found: Error: Can't resolve 'fs' in 'C:/GIT/MyProject/SPFx/MyWebPart/node_modules/jira-connector/api' resolve 'fs' in 'C:/GIT/MyProject/SPFx/MyWebPart/node_modules/jira-connector/api'
It seems to me that if you want to use this extension to work on your site, then you cannot do it. I would look towards jira.js
Hi, I tried to use the Jira connector in a Sharepoint SPFx webpart (Typescript, React).
Environment: npm is version 6.8.0, tsc is version 3.7.3
First I installed using "npm install jira-connector". Output is:
package.json is: ... "jira-connector": "^3.1.0"
The import statement is "import JiraClient from 'jira-connector';" Code after authentication is: "const issue = await jira.issue.getIssue({ issueKey: "JWR-19" });"
When I run "gulp serve" the following error message is displayed:
callback.d.ts: export type Callback = (err: any, data: TData) => void;
Any ideas whats wrong? My fault? Have I missed something?