Hello. Today I was testing new SPFX 1.8 with extension example. From documentation I know that default rush stack is 2.7. But I want to use office fabric react in version 6 so I need the newer version of typescript.
I have installed rush-stack-compiler-3.3 like is written in documentation and changed this row:
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
Everything looks great but when I wrote
gulp build I get these errors:
[18:54:08] Error - [tslint] The 'member-access' rule threw an error in 'XXXXX/src/extensions/buttonsContracte/ButtonsContracteCommandSet.ts':
TypeError: Cannot read property 'length' of undefined
at recur (XXXXX\node_modules\@microsoft\rush-stack-compiler-3.3\node_modules\tslint\lib\rules\memberAccessRule.js:91:57)
at visitNodes XXXXX\node_modules\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16224:30)
at Object.forEachChild (XXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16450:24)
at recur (XXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\tslint\lib\rules\memberAccessRule.js:108:19)
at visitNode (XXXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16215:24)
at Object.forEachChild (XXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16345:21)
at recur (XXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\tslint\lib\rules\memberAccessRule.js:108:19)
at visitNodes (XXXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16224:30)
at Object.forEachChild (XXXXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\typescript\lib\typescript.js:16525:21)
at recur (XXXXXX\@microsoft\rush-stack-compiler-3.3\node_modules\tslint\lib\rules\memberAccessRule.js:108:19)
[18:54:16] Error - [tslint] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
[18:54:16] Error - [tslint] 1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::Factory::NewUninitializedFixedArray
5: v8::internal::WasmDebugInfo::SetupForTesting
6: v8::internal::interpreter::BytecodeArrayRandomIterator::UpdateOffsetFromIndex
7: 00000276434043C1
[18:54:17] Finished subtask 'tslint' after 18 s
[18:54:17] Starting subtask 'post-copy'...
[18:54:17] Finished subtask 'post-copy' after 567 渭s
[18:54:17] Finished 'build' after 18 s
[18:54:17] ==================[ Finished ]==================
Error - [tslint] The 'member-access' rule threw an error in XXXXX/src/extensions/buttonsContracte/ButtonsContracteCommandSet.ts':
TypeError: Cannot read property 'length' of undefined
at recur (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/tslint/lib/rules/memberAccessRule.js:91:57)
at visitNodes (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16224:30)
at Object.forEachChild (XXXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16450:24)
at recur (XXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/tslint/lib/rules/memberAccessRule.js:108:19)
at visitNode (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16215:24)
at Object.forEachChild (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16345:21)
at recur (XXXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/tslint/lib/rules/memberAccessRule.js:108:19)
at visitNodes (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16224:30)
at Object.forEachChild (XXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/typescript/lib/typescript.js:16525:21)
at recur (XXXXXX/node_modules/@microsoft/rush-stack-compiler-3.3/node_modules/tslint/lib/rules/memberAccessRule.js:108:19)
Error - [tslint] FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Error - [tslint] 1: node_module_register
2: v8::internal::FatalProcessOutOfMemory
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::Factory::NewUninitializedFixedArray
5: v8::internal::WasmDebugInfo::SetupForTesting
6: v8::internal::interpreter::BytecodeArrayRandomIterator::UpdateOffsetFromIndex
7: 00000276434043C1
My code is default code which automatically is generated when you choose exentsion type of command bar button.
Thank you.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Did you delete the node_modules folder after making the change, then reinstalling all dependencies?
Also, make sure you are using version 1.6 of the rush compiler for TypeScript 3.3 as more current versions are causing some issues.
I blogged the steps here: http://www.andrewconnell.com/blog/sharepoint-framework-v1-8-0-what-s-in-the-latest-update-of-spfx#support-for-typescript
Hello Andrew. Thank you very much for your help. I try to delete all node_modules and then reinstall it. Not all dependencies were automatically installed by npm install but I installed it manually and after that everything start to work. So again thank you very much for your help.
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
Most helpful comment
Did you delete the node_modules folder after making the change, then reinstalling all dependencies?
Also, make sure you are using version 1.6 of the rush compiler for TypeScript 3.3 as more current versions are causing some issues.
I blogged the steps here: http://www.andrewconnell.com/blog/sharepoint-framework-v1-8-0-what-s-in-the-latest-update-of-spfx#support-for-typescript