cognitedata / cognite-sdk-js

  • 6 March 2023
  • 9 replies

Badge +6, I am trying to run npm install and $ REACT_APP_CDF_PROJECT=... REACT_APP_AZURE_TENANT_ID=... REACT_APP_AZURE_APP_ID=... npm start

got the following error:

  throw err;

Error: Cannot find module '/Users/kevin.peng/code/cognite/cognite-sdk-js/samples/react/msal-browser-react/start'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
    at Function.Module._load (node:internal/modules/cjs/loader:866:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47 {
  requireStack: []


Best answer by Dilini Fernando 4 May 2023, 18:29

View original

9 replies


I’m having trouble replicating this problem. Could you be able to give me more details?
Which OS are you running? What’s your node / npm version?

Badge +6

node --version                                                                                              9 ↵

npm --version                                                                                                 ✔

OS MAC ventura 13.2.1 M1

Thanks for the response. I can now see weird behavior with node v16 around dependencies, and we cannot even install with node v18. I’ll try to update the dependencies there to make it work with both.
Thanks for letting us know! I’ll update here once I have the solution merged.

Userlevel 6

Hi @Baris Demirel checking in to see if the above is resolved? Let us know if you still have issues, 

Hi there, sorry for all this delay. I’ve merged a fix now. If you fetch the latest version, you should be able to use the samples, no problem.
Let me know if you still have any issues!

Userlevel 4
Badge +2

Hi @kevinpeng,

Were you able to fetch the latest version and try it out?
Let us know if you have any questions. 


Badge +6


get following error:


Module not found: Error: Can't resolve '@cognite/sdk-core' in '/Users/kevin.peng/code/cognite/cognite-sdk-js/samples/react/msal-browser-react/node_modules/@cognite/sdk/dist'


node version v19.9.0

npm version 9.6.4


mac arm

Hi Kevin,

I’m sorry for the delay in response, I’ve missed it.

You need to run `yarn build` or `npm build` in `Users/kevin.peng/code/cognite/cognite-sdk-js`. And if npm doesn’t work, please try yarn, the repository uses yarn by default.

Userlevel 4
Badge +2

Hi @kevinpeng,

I hope Baris' response was helpful, and that you were able to resolve the issue.

As of now, I will close this thread. Please let us know if you have any questions.

Best regards,