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

Draw #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

VanshikaSabharwal
Copy link
Contributor

Description

I added testing for store.js file in app folder.

  • This PR does the following:
    -testing of store.js file of app folder

Related Issues

This helps to automatically close related issues when the PR is merged.

Changes

List the detailed changes made in this PR.
Testing

Testing Instructions

Detailed instructions on how to test the changes. Include any setup needed and specific test cases.

  1. Pull this branch.
  2. Run npm install to install dependencies.
  3. Run npm test to execute the test suite.
  4. Make changes if needed in project.
  5. Run git add.
  6. Run git commit -m
  7. Run git push

Screenshots (if applicable)

testingForStorejs

Additional Context

Any additional context or information that reviewers should be aware of.

  • This PR is based on the following...

Checklist

Make sure to check off all the items before submitting. Mark with [x] if done.

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I am working on this issue under GSSOC

Copy link

vercel bot commented Jun 1, 2024

@VanshikaSabharwal is attempting to deploy a commit to the dhruvpatidar359's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jun 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextdraw ❌ Failed (Inspect) Jun 2, 2024 3:03am

@dhruvpatidar359
Copy link
Owner

@VanshikaSabharwal I think there are some problems with the code :

[08:32:48.258] Cloning github.com/dhruvpatidar359/nextdraw (Branch: draw, Commit: 44a7246)
[08:32:49.315] Cloning completed: 1.051s
[08:32:58.928] Restored build cache
[08:32:59.213] Running "vercel build"
[08:33:00.473] Vercel CLI 34.2.4
[08:33:01.322] Installing dependencies...
[08:33:04.109] npm WARN EBADENGINE Unsupported engine {
[08:33:04.110] npm WARN EBADENGINE   package: '[email protected]',
[08:33:04.112] npm WARN EBADENGINE   required: { node: '>=20.0.0', npm: '>=9.6.4' },
[08:33:04.112] npm WARN EBADENGINE   current: { node: 'v18.19.1', npm: '10.2.4' }
[08:33:04.112] npm WARN EBADENGINE }
[08:33:07.691] npm WARN deprecated [email protected]: Use your platform's native DOMException instead
[08:33:07.694] npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
[08:33:14.397] 
[08:33:14.397] > [email protected] prepare
[08:33:14.397] > husky install
[08:33:14.397] 
[08:33:14.451] husky - Git hooks installed
[08:33:14.460] 
[08:33:14.461] added 102 packages, and changed 6 packages in 12s
[08:33:14.463] 
[08:33:14.463] 198 packages are looking for funding
[08:33:14.463]   run `npm fund` for details
[08:33:14.482] Detected Next.js version: 14.2.3
[08:33:14.488] Detected `package-lock.json` generated by npm 7+
[08:33:14.489] Running "npm run build"
[08:33:15.092] 
[08:33:15.092] > [email protected] build
[08:33:15.093] > next build
[08:33:15.093] 
[08:33:15.773]   ▲ Next.js 14.2.3
[08:33:15.774] 
[08:33:15.846]    Creating an optimized production build ...
[08:33:37.378]  ✓ Compiled successfully
[08:33:37.379]    Linting and checking validity of types ...
[08:33:40.643] 
[08:33:40.643] ./components/Canvas.jsx
[08:33:40.644] 112:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 193:6  Warning: React Hook useEffect has missing dependencies: 'action', 'dispatch', and 'selectedElement'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 222:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 
[08:33:40.644] ./components/PropertiesBar/PropertiesBar.jsx
[08:33:40.645] 72:23  Warning: Assignments to the 'element' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 179:19  Warning: Assignments to the 'element' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 
[08:33:40.645] ./components/TopBar/CircularToolBar/CircularToolBar.jsx
[08:33:40.645] 18:21  Warning: Assignments to the 'selectorModal' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 19:21  Warning: Assignments to the 'currentWeapon' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 35:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.645] 
[08:33:40.646] ./components/TopBar/Menu/Menu.jsx
[08:33:40.646] 51:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.646] 
[08:33:40.646] ./components/TopBar/Menu/SimpleColorPicker.jsx
[08:33:40.646] 34:6  Warning: React Hook useMemo has an unnecessary dependency: 'stroke'. Either exclude it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.646] 
[08:33:40.646] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[08:33:40.647]    Collecting page data ...
[08:33:42.524]    Generating static pages (0/5) ...
[08:33:42.624]    Generating static pages (1/5) 
[08:33:42.633]    Generating static pages (2/5) 
[08:33:42.794]    Generating static pages (3/5) 
[08:33:42.945] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
[08:33:42.945]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61599)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:42.946]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:42.946]     at nD (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:66680)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64853)
[08:33:42.946]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:42.946]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:58560)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:42.946]     at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
[08:33:42.947]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717) {
[08:33:42.947]   digest: '297990471'
[08:33:42.947] }
[08:33:43.098] 
[08:33:43.102] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
[08:33:43.103] 
[08:33:43.103] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
[08:33:43.103]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61599)
[08:33:43.103]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:43.103]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:43.104]     at nD (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:66680)
[08:33:43.104]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64853)
[08:33:43.104]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:43.104]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:58560)
[08:33:43.104]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:43.104]     at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
[08:33:43.105]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717)
[08:33:43.105]  ✓ Generating static pages (5/5)
[08:33:43.113] 
[08:33:43.114] > Export encountered errors on following paths:
[08:33:43.114] 	/page: /
[08:33:43.183] Error: Command "npm run build" exited with 1
[08:33:43.524] ```

@VanshikaSabharwal
Copy link
Contributor Author

@VanshikaSabharwal I think there are some problems with the code :

[08:32:48.258] Cloning github.com/dhruvpatidar359/nextdraw (Branch: draw, Commit: 44a7246)
[08:32:49.315] Cloning completed: 1.051s
[08:32:58.928] Restored build cache
[08:32:59.213] Running "vercel build"
[08:33:00.473] Vercel CLI 34.2.4
[08:33:01.322] Installing dependencies...
[08:33:04.109] npm WARN EBADENGINE Unsupported engine {
[08:33:04.110] npm WARN EBADENGINE   package: '[email protected]',
[08:33:04.112] npm WARN EBADENGINE   required: { node: '>=20.0.0', npm: '>=9.6.4' },
[08:33:04.112] npm WARN EBADENGINE   current: { node: 'v18.19.1', npm: '10.2.4' }
[08:33:04.112] npm WARN EBADENGINE }
[08:33:07.691] npm WARN deprecated [email protected]: Use your platform's native DOMException instead
[08:33:07.694] npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
[08:33:14.397] 
[08:33:14.397] > [email protected] prepare
[08:33:14.397] > husky install
[08:33:14.397] 
[08:33:14.451] husky - Git hooks installed
[08:33:14.460] 
[08:33:14.461] added 102 packages, and changed 6 packages in 12s
[08:33:14.463] 
[08:33:14.463] 198 packages are looking for funding
[08:33:14.463]   run `npm fund` for details
[08:33:14.482] Detected Next.js version: 14.2.3
[08:33:14.488] Detected `package-lock.json` generated by npm 7+
[08:33:14.489] Running "npm run build"
[08:33:15.092] 
[08:33:15.092] > [email protected] build
[08:33:15.093] > next build
[08:33:15.093] 
[08:33:15.773]   ▲ Next.js 14.2.3
[08:33:15.774] 
[08:33:15.846]    Creating an optimized production build ...
[08:33:37.378]  ✓ Compiled successfully
[08:33:37.379]    Linting and checking validity of types ...
[08:33:40.643] 
[08:33:40.643] ./components/Canvas.jsx
[08:33:40.644] 112:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 193:6  Warning: React Hook useEffect has missing dependencies: 'action', 'dispatch', and 'selectedElement'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 222:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.644] 
[08:33:40.644] ./components/PropertiesBar/PropertiesBar.jsx
[08:33:40.645] 72:23  Warning: Assignments to the 'element' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 179:19  Warning: Assignments to the 'element' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 
[08:33:40.645] ./components/TopBar/CircularToolBar/CircularToolBar.jsx
[08:33:40.645] 18:21  Warning: Assignments to the 'selectorModal' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 19:21  Warning: Assignments to the 'currentWeapon' variable from inside React Hook useEffect will be lost after each render. To preserve the value over time, store it in a useRef Hook and keep the mutable value in the '.current' property. Otherwise, you can move this variable directly inside useEffect.  react-hooks/exhaustive-deps
[08:33:40.645] 35:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.645] 
[08:33:40.646] ./components/TopBar/Menu/Menu.jsx
[08:33:40.646] 51:6  Warning: React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.646] 
[08:33:40.646] ./components/TopBar/Menu/SimpleColorPicker.jsx
[08:33:40.646] 34:6  Warning: React Hook useMemo has an unnecessary dependency: 'stroke'. Either exclude it or remove the dependency array.  react-hooks/exhaustive-deps
[08:33:40.646] 
[08:33:40.646] info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
[08:33:40.647]    Collecting page data ...
[08:33:42.524]    Generating static pages (0/5) ...
[08:33:42.624]    Generating static pages (1/5) 
[08:33:42.633]    Generating static pages (2/5) 
[08:33:42.794]    Generating static pages (3/5) 
[08:33:42.945] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
[08:33:42.945]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61599)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:42.946]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:42.946]     at nD (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:66680)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64853)
[08:33:42.946]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:42.946]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:58560)
[08:33:42.946]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:42.946]     at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
[08:33:42.947]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717) {
[08:33:42.947]   digest: '297990471'
[08:33:42.947] }
[08:33:43.098] 
[08:33:43.102] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
[08:33:43.103] 
[08:33:43.103] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
[08:33:43.103]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:61599)
[08:33:43.103]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:43.103]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:43.104]     at nD (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:66680)
[08:33:43.104]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64853)
[08:33:43.104]     at nB (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:67538)
[08:33:43.104]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:58560)
[08:33:43.104]     at nN (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:64546)
[08:33:43.104]     at nI (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47010)
[08:33:43.105]     at nM (/vercel/path0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:47717)
[08:33:43.105]  ✓ Generating static pages (5/5)
[08:33:43.113] 
[08:33:43.114] > Export encountered errors on following paths:
[08:33:43.114] 	/page: /
[08:33:43.183] Error: Command "npm run build" exited with 1
[08:33:43.524] ```

Actually the issue is because linting is checking if there is any problem . To resolve this we have to follow all the advices mentioned while linting and correct the code.

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

Successfully merging this pull request may close these issues.

Add testing for store.js file in app folder
2 participants