sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Does not work with 1.6

Open Ofer-Gal opened this issue 8 years ago • 5 comments

I get "Cannot find module "itRequestsStrings" (it is in mystrings.d.ts) If I rem the "import * as strings from 'itRequestsStrings';" I get "Property 'dataTable' does not exist on type 'JQuery<HTMLElement>'. Did you mean 'DataTable'"


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Ofer-Gal avatar Oct 27 '18 18:10 Ofer-Gal

The dataTable mean DataTable from jquery.dataTables.min js, we do not need to change it. What you need is change the itRequestsStrings after creating the project( Keep Names consistent between importing and exporting).

Note: you maybe need to run **npm i jquery** and **npm i moment**.

I run SPFx 1.6 and follow the docs, every thing is OK. Before running the code, donot forget to create the list "IT Requests"

Seiyasu avatar Oct 29 '18 04:10 Seiyasu

With spfx 1.7, I got the following with both ItRequestsWebPart.ts and moment-plugin.ts. "error TS2339: Property 'render' does not exist on type '(param?: Settings) => DataTable'.

aaronmi avatar Jan 14 '19 22:01 aaronmi

In stage: Transform the plain JavaScript code to TypeScript, changed code to ($.fn.DataTable as any).render.moment('YYYY/MM/DD'). Got runtime error:

ItRequestsWebPart.ts:72 Uncaught (in promise) TypeError: Cannot read property 'render' of undefined at ItRequestsWebPart.render (ItRequestsWebPart.ts:72) at ItRequestsWebPart.t._renderWithAccessibleTitle (sp-webpart-workbench-assembly_en-us_cee2ed9196d873e2374ab4945906bf2a.js:577) at sp-webpart-workbench-assembly_en-us_cee2ed9196d873e2374ab4945906bf2a.js:577

aaronmi avatar Jan 14 '19 22:01 aaronmi

Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you.

msft-github-bot avatar Apr 23 '19 12:04 msft-github-bot

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 26 '20 06:01 msft-github-bot