Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm error transpileDependencies.map is not a function

When I try to run my program I get the following error: enter image description here

I deleted and reinstalled node, but it still gives this error.

like image 750
AminModaresi Avatar asked Jan 24 '26 15:01

AminModaresi


2 Answers

I faced this problem today. It was a project I was working on without any remote version so I didn't use Github. To solve this problem, I compared "important files" on my project with those on another project where I was not having this issue. By "important files", I mean package.json and all config files.

To solve this, I changed the version of @vue/cli-plugin-babel to "~5.0.0".

package.json

"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"vue-cli-plugin-tailwind": "~3.0.0" }

Then I deleted the node_modules folder. And finally I ran the command:

npm i

I hope this helps.

like image 196
GBETNKOM NJIFON Avatar answered Jan 27 '26 05:01

GBETNKOM NJIFON


If you pulled your project from Github or somewhere else, you probably lost something. Just download it again and fix it.
Cause of error: Project lost file!

like image 33
Mr.Z Avatar answered Jan 27 '26 06:01

Mr.Z



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!