Closed mdelarocha closed 8 months ago
hi @mdelarocha I tried building your file but received the following error
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:15:9 - error TS1110: Type expected.
15 in: `${ParameterLocation}`;
~~~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:17:11 - error TS1109: Expression expected.
17 style?: SerializationStyle;
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:19:13 - error TS1109: Expression expected.
19 explode?: boolean;
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:21:21 - error TS1109: Expression expected.
21 skipUriEncoding?: boolean;
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:22:1 - error TS1128: Declaration or statement expected.
22 }
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:27 - error TS1110: Type expected.
24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>);
~~~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:69 - error TS1109: Expression expected.
24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>);
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:97 - error TS1005: '(' expected.
24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>);
~
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:25:1 - error TS1128: Declaration or statement expected.
25 }
~
Found 9 errors.
hi @mdelarocha I tried building your file but received the following error
node_modules/@autorest/codemodel/dist/model/http/http.d.ts:15:9 - error TS1110: Type expected. 15 in: `${ParameterLocation}`; ~~~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:17:11 - error TS1109: Expression expected. 17 style?: SerializationStyle; ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:19:13 - error TS1109: Expression expected. 19 explode?: boolean; ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:21:21 - error TS1109: Expression expected. 21 skipUriEncoding?: boolean; ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:22:1 - error TS1128: Declaration or statement expected. 22 } ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:27 - error TS1110: Type expected. 24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>); ~~~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:69 - error TS1109: Expression expected. 24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>); ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:24:97 - error TS1005: '(' expected. 24 constructor(location: `${ParameterLocation}`, objectInitializer?: DeepPartial<HttpParameter>); ~ node_modules/@autorest/codemodel/dist/model/http/http.d.ts:25:1 - error TS1128: Declaration or statement expected. 25 } ~ Found 9 errors.
Hi @maisnamraju, thanks for your comment. What version of tsc do you have installed? I am testing this with version 4.6.3. If you run tsc -p .
from the root directory it builds your dist
folder for the plugin to work. For some reason when running through npm it doesn't ignore the node_modules
directory where those errors are coming from and we have no control over the structure/linting of those folders therefore why its erroring out. The code inside the project itself is fine however.
Should address #2, the main issue was that js-yaml was pinned at v3 and Autorest uses v4+. There were also other modules, specifically the @azure-tools ones that got renamed that I also upgraded. Got it to work in my local with the following command:
Hope this helps some folks waiting for this to work!