I am writing unit test for SPFx web part. when i run gulp test command i am getting the following error Cannot find module "@ms/sp-telemetry". i am using '@microsoft/sp-http' in the react component.
I have the following versions
"dependencies": {
"@microsoft/decorators": "^1.5.0",
"@microsoft/sp-application-base": "^1.5.0",
"@microsoft/sp-client-preview": "^1.5.0",
"@microsoft/sp-core-library": "^1.5.0",
"@microsoft/sp-http": "^1.5.0",
"@microsoft/sp-lodash-subset": "^1.5.0",
"@microsoft/sp-office-ui-fabric-core": "~1.4.1",
"@microsoft/sp-webpart-base": "^1.5.0",
"devDependencies": {
"@microsoft/sp-build-web": "^1.5.0",
"@microsoft/sp-module-interfaces": "^1.5.0",
"@microsoft/sp-webpart-workbench": "^1.5.0",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/enzyme": "^2.8.12",
"@types/mocha": ">=2.2.33 <2.6.0",
"@types/sinon": "^1.16.36",
Please do let me know if any additional information required.
Thanks,
Which node.js version you are using? Can you try with 8.11.2?
Hi,
I am using Node version:v8.9.4 . let me try with 8.11.2 and keep you updated.
@muradaliyev that didn't help.
Sorry, have nothing to add. It's now tagged as bug by Vesa
similar issues about this in the issues list for a while now. https://github.com/SharePoint/sp-dev-docs/issues/526 is one
I had the same issue but i found a fix!
Seems I was referencing imports from the same folder, however one group was listed in my index, the other was referenced all the way. For example:
import { ModuleName } From "./provider/module
import { SecondModule } from "./provider"
once i changed the second module to reference all the way instead of using the index.ts file inside the folder my issue went away.
Hope this helps someone.
This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.