Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error While running npm run test #79

Open
Meetverma opened this issue Feb 14, 2024 · 0 comments
Open

Error While running npm run test #79

Meetverma opened this issue Feb 14, 2024 · 0 comments

Comments

@Meetverma
Copy link

Upon completing the First Exercise npm run test is giving such error:

made the change: <span>Hello World</span>

npm run test 

> [email protected] test
> npm run compile && mocha -b --compilers js:babel/register --require test/helpers.js test/**/*.js || echo


> [email protected] compile
> babel exercises --out-dir src

exercises/01-HelloWorld.jsx -> src/01-HelloWorld.js
exercises/02-PartiesList.jsx -> src/02-PartiesList.js
exercises/03-WhatsYourName.jsx -> src/03-WhatsYourName.js
exercises/04-Quiz.jsx -> src/04-Quiz.js
exercises/05-Challenge-GroceryList-part-1.jsx -> src/05-Challenge-GroceryList-part-1.js
exercises/05-Challenge-GroceryList-part-2.jsx -> src/05-Challenge-GroceryList-part-2.js
exercises/05-Challenge-GroceryList-part-3.jsx -> src/05-Challenge-GroceryList-part-3.js
exercises/05-Challenge-GroceryList-part-4.jsx -> src/05-Challenge-GroceryList-part-4.js
exercises/06-RenderComponent.jsx -> src/06-RenderComponent.js
exercises/07-LifecycleMethods.js.jsx -> src/07-LifecycleMethods.js.js
exercises/main.jsx -> src/main.js
/Users/meetverma/Documents/contributions/reactjs_koans/test/helpers.js:10
global.navigator = { userAgent: "Node.JS" };
                 ^

TypeError: Cannot set property navigator of #<Object> which has only a getter
    at Object.<anonymous> (/Users/meetverma/Documents/contributions/reactjs_koans/test/helpers.js:8:17)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at normalLoader (/Users/meetverma/Documents/contributions/reactjs_koans/node_modules/babel-core/lib/api/register/node.js:199:5)
    at Object.require.extensions.<computed> [as .js] (/Users/meetverma/Documents/contributions/reactjs_koans/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1234:19)
    at require (node:internal/modules/helpers:176:18)
    at /Users/meetverma/Documents/contributions/reactjs_koans/node_modules/mocha/bin/_mocha:311:3
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/meetverma/Documents/contributions/reactjs_koans/node_modules/mocha/bin/_mocha:310:10)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49

Node.js v21.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant