-
Notifications
You must be signed in to change notification settings - Fork 6
Description
We are going through the steps in the ReadMe for doing some Jest testing with out SPFx webparts. When we run the npm install jest @voitanos/jest-preset-spfx-react16 --save-dev it is erroring out with the following:
$ npm install jest @voitanos/jest-preset-spfx-react16 --save-dev
@voitanos/jest-preset-spfx-react16@1.5.0 postinstall C:\Users\kkittinger\Documents\DevOps Resp\SPFX Development\React\FAQ - Dynamic Accordion\node_modules@voitanos\jest-preset-spfx-react16
node scripts/postinstall.js
JEST PRESET POSTINSTALL STEP 1 of 4...
INFO: Adding Jest configuration file to: ./config/jest.config.json
INFO: jest.config.json not found; creating it
JEST PRESET POSTINSTALL STEP 2 of 4...
INFO: Updating NPM script 'test' to use Jest.
INFO" package.json script/test currently set to default SPFx project; updating to use jest
INFO: package.json scripts updated for Jest testing
.. run "npm test" or "npm test:watch" to run Jest tests
JEST PRESET POSTINSTALL STEP 3 of 4...
INFO: Ensure tsconfig.json includes '@types/jest' in the types property
internal/modules/cjs/loader.js:1109
throw err;
^
SyntaxError: C:\Users\kkittinger\Documents\DevOps Resp\SPFX Development\React\FAQ - Dynamic Accordion\tsconfig.json: Unexpected token ] in JSON at position 632
at parse ()
at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\kkittinger\Documents\DevOps Resp\SPFX Development\React\FAQ - Dynamic Accordion\node_modules@voitanos\jest-preset-spfx-react16\scripts\postinstall.js:101:20)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
npm WARN notsup Unsupported engine for write-file-atomic@5.0.0: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: write-file-atomic@5.0.0
npm WARN notsup Unsupported engine for write-file-atomic@5.0.0: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: write-file-atomic@5.0.0
npm WARN notsup Unsupported engine for write-file-atomic@5.0.0: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"14.16.1","npm":"6.14.12"})
npm WARN notsup Not compatible with your version of node/npm: write-file-atomic@5.0.0
npm WARN @pnp/sp-clientsvc@1.3.11 requires a peer of @pnp/common@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-clientsvc@1.3.11 requires a peer of @pnp/logging@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-clientsvc@1.3.11 requires a peer of @pnp/odata@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-clientsvc@1.3.11 requires a peer of @pnp/sp@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-taxonomy@1.3.11 requires a peer of @pnp/logging@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-taxonomy@1.3.11 requires a peer of @pnp/common@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-taxonomy@1.3.11 requires a peer of @pnp/odata@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN @pnp/sp-taxonomy@1.3.11 requires a peer of @pnp/sp@1.3.11 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN @voitanos/jest-preset-spfx-react16@1.5.0 requires a peer of jest@26.6.3 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest@26.5.6 requires a peer of jest@>=26 <27 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules@rushstack\typings-generator\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @voitanos/jest-preset-spfx-react16@1.5.0 postinstall: node scripts/postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @voitanos/jest-preset-spfx-react16@1.5.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
React: 16.13.1
NPM: 6.14.12
Node: 14.16.1
"@microsoft/rush-stack-compiler-3.9": "0.4.47"