ixartz/Next-js-Boilerplate

HookWebpackError: Cannot convert a Symbol value to a string

sarmadkamal464 opened this issue · 1 comments

Hi, I am currently using your template for my project on GitHub. However, I have encountered an error while attempting to generate the next build using the command "npm run build".

The error message I am receiving is as follows:
HookWebpackError: Cannot convert a Symbol value to a string at makeWebpackError (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/webpack/bundle5.js:28:311139) at /Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/webpack/bundle5.js:28:105980 at eval (eval at create (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/webpack/bundle5.js:13:28867), <anonymous>:27:1) at /Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/webpack/bundle5.js:28:69387 at /Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js:441:143 -- inner error -- TypeError: Cannot convert a Symbol value to a string at Object.TemplateLiteral (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:67573) at async Object.BinaryExpression (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:59330) at async Object.ArrayExpression (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:58890) at async computePureStaticValue (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:21246) at async Object.enter (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:27364) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78333) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78791) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78872) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78872) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78791) caused by plugins in Compilation.hooks.processAssets TypeError: Cannot convert a Symbol value to a string at Object.TemplateLiteral (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:67573) at async Object.BinaryExpression (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:59330) at async Object.ArrayExpression (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:58890) at async computePureStaticValue (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:21246) at async Object.enter (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:1:27364) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78333) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78791) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78872) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78872) at async AsyncWalker.visit (/Users/user/Documents/sities/PFFT/PFFT.AI/node_modules/next/dist/compiled/@vercel/nft/index.js:6:78791)

I would greatly appreciate your assistance in resolving this issue. If you require any additional information or logs, please let me know, and I will be happy to provide them.

`{
"name": "pfft.ai",
"version": "3.9.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"build-stats": "cross-env ANALYZE=true npm run build",
"export": "next export",
"build-prod": "run-s clean build export",
"clean": "rimraf .next out",
"lint": "next lint",
"format": "next lint --fix && prettier '**/.{json,yaml}' --write --ignore-path .gitignore",
"check-types": "tsc --noEmit --pretty && tsc --project cypress --noEmit --pretty",
"test": "jest",
"commit": "cz",
"cypress": "cypress open",
"cypress:headless": "cypress run",
"e2e": "start-server-and-test dev http://localhost:3000 cypress",
"e2e:headless": "start-server-and-test dev http://localhost:3000 cypress:headless",
"storybook": "storybook dev -p 6006",
"storybook:build": "storybook build",
"storybook:serve": "http-server storybook-static --port 6006 --silent",
"serve-storybook": "run-s storybook:
",
"test-storybook:ci": "start-server-and-test serve-storybook http://localhost:6006 test-storybook",
"prepare": "husky install",
"postbuild": "next-sitemap"
},
"dependencies": {
"@guna81/react-ticker": "^3.4.1",
"@material-tailwind/react": "^2.0.1",
"@mui/material": "^5.12.2",
"@mui/x-data-grid": "^6.3.0",
"@stripe/react-stripe-js": "^2.1.1",
"@stripe/stripe-js": "^1.54.1",
"@stripe/ui-extension-sdk": "^8.7.0",
"@types/react-animate-on-scroll": "^2.1.5",
"@types/react-stripe-elements": "^6.0.6",
"animate.css": "^4.1.1",
"axios": "^1.4.0",
"bcrypt": "^5.1.0",
"bcryptjs": "^2.4.3",
"crypto-js": "^4.1.1",
"formik": "^2.4.2",
"jsonwebtoken": "^9.0.0",
"lodash": "^4.17.21",
"mongo-seeding": "^3.7.2",
"mongodb": "^5.5.0",
"mongoose": "^6.11.2",
"mongoose-data-faker": "^0.1.2",
"next": "^13.4.3",
"next-auth": "^4.22.1",
"next-connect": "^0.13.0",
"next-seo": "^5.15.0",
"next-sitemap": "^4.0.6",
"react": "^18.2.0",
"react-animation-on-scroll": "^5.1.0",
"react-card-flip": "^1.2.0",
"react-dom": "^18.2.0",
"react-google-recaptcha": "^3.1.0",
"react-icons": "^4.8.0",
"react-share": "^4.4.1",
"react-spinners": "^0.13.8",
"react-toastify": "^9.1.3",
"stripe": "^12.9.0",
"tw-elements": "^1.0.0-beta2",
"validator": "^13.9.0"
},
"devDependencies": {
"@commitlint/cli": "^17.5.1",
"@commitlint/config-conventional": "^17.4.4",
"@commitlint/cz-commitlint": "^17.5.0",
"@next/bundle-analyzer": "^13.3.0",
"@percy/cli": "^1.22.0",
"@percy/cypress": "^3.1.2",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@storybook/addon-essentials": "^7.0.2",
"@storybook/addon-interactions": "^7.0.2",
"@storybook/addon-links": "^7.0.2",
"@storybook/blocks": "^7.0.2",
"@storybook/nextjs": "^7.0.2",
"@storybook/react": "^7.0.2",
"@storybook/test-runner": "^0.10.0",
"@storybook/testing-library": "^0.0.14-next.2",
"@testing-library/cypress": "^9.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/bcrypt": "^5.0.0",
"@types/bcryptjs": "^2.4.2",
"@types/jest": "^29.5.0",
"@types/jsonwebtoken": "^9.0.2",
"@types/mongoose": "^5.11.97",
"@types/node": "^18.16.1",
"@types/react": "^18.0.33",
"@types/react-google-recaptcha": "^2.1.5",
"@types/validator": "^13.7.15",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"autoprefixer": "^10.4.14",
"commitizen": "^4.3.0",
"cross-env": "^7.0.3",
"cssnano": "^6.0.0",
"cypress": "^12.9.0",
"eslint": "^8.37.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-next": "^13.3.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-cypress": "^2.13.2",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-storybook": "^0.6.11",
"eslint-plugin-tailwindcss": "^3.11.0",
"eslint-plugin-testing-library": "^5.10.2",
"eslint-plugin-unused-imports": "^2.0.0",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"lint-staged": "^13.2.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.21",
"prettier": "^2.8.7",
"rimraf": "^4.4.1",
"semantic-release": "^19.0.5",
"start-server-and-test": "^2.0.0",
"storybook": "^7.0.2",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.5"
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
"release": {
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/git",
"@semantic-release/github"
]
},
"author": "Ixartz (https://github.com/ixartz)"
}

ixartz commented

@sarmadkamal464 the error is probably related to Next.js with webpack. The boilerplate doesn't make any change in the webpack.

Don't hesitate to reopen the issue if it's not the case and the error is coming from the boilerplate.