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

前端报错问题解决 ReferenceError: primordials is not defined #57

Open
zane001 opened this issue Oct 25, 2023 · 0 comments
Open

Comments

@zane001
Copy link

zane001 commented Oct 25, 2023

client/package.json中"gulp": "^3.9.1", 在npm run build 时会报错ReferenceError: primordials is not defined
原因是因为 node版本与gulp版本不兼容导致
解决办法:
"scripts": {
"preinstall": "npx npm-force-resolutions",
"dev": "cross-env NODE_ENV=local vue-cli-service serve",
"build": "vue-cli-service build && gulp"
},
"resolutions": {
"graceful-fs": "^4.2.4"
},

然后执行 npm install
npm run build

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

No branches or pull requests

1 participant