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

npm run serve failing #317

Open
mohankocherlakota opened this issue Jul 28, 2022 · 5 comments
Open

npm run serve failing #317

mohankocherlakota opened this issue Jul 28, 2022 · 5 comments

Comments

@mohankocherlakota
Copy link

pm run serve

vue-heroes@0.1.0 serve
vue-cli-service serve

ERROR TypeError: transpileDependencies.map is not a function
TypeError: transpileDependencies.map is not a function
at genTranspileDepRegex (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-plugin-babel/index.js:5:38)
at module.exports (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-plugin-babel/index.js:21:29)
at /Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-service/lib/Service.js:82:9
at Array.forEach ()
at loadedCallback (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-service/lib/Service.js:80:20)
at Service.init (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-service/lib/Service.js:97:14)
at Service.run (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-service/lib/Service.js:247:16)
at Object. (/Users/kvsnskmohan/Desktop/Vue.js/vue-getting-started/02-getting-started/end/vue-heroes/node_modules/@vue/cli-service/bin/vue-cli-service.js:37:9)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)

@mohankocherlakota
Copy link
Author

Can anyone provide the solution

@shannoneoff
Copy link

Same error once I get to 'npm install'. I see a whole lot of "gyp verb ERR!" and it starts with "npm ERR! code path 1". The first path it references is ..\vue-heroes\node_modules\node-sass. Every line is an error after that.

@shannoneoff
Copy link

shannoneoff commented Jan 20, 2023

I know the error has to do with the node referenced in the code is an older version, as well as node-sass and sass-loader. For hours, I tried to get to the bottom of things but never could. Here are the best leads I could find...

Find the correct versions of Node and node-sass here: https://github.com/sass/node-sass (I believe it is Node 16.x.x + node-sass 6.x.x)

Once I was using these, the sass-loader error came up where 6.0.0 wouldn't work with ^4.0.0. There was also a possible issue with a webpack and also "TypeError: this.getOptions is not a function
at Object.loader".
I couldn't figure all of these out, so I will just watch the rest and do my best to pick up everything I can.

@DangRock
Copy link

DangRock commented Aug 1, 2023

Hope this helps... I use this course as part of my new hire training program and we recently had to get this running again. For us, at least, the fix is pretty easy:

  1. In package.json, change “node-sass”:”^4.9.0” to “sass”:”^1.32.5”
  2. If you’re version of Node (check using “node --version") is 17 or greater, at terminal, run “npm install node@16.0.0 --save-dev”

After #1, "npm install" should work. If you have node version 17 or greater, then #2 is required for "npm run serve" to work.

@MaciejDygner
Copy link

Hope this helps... I use this course as part of my new hire training program and we recently had to get this running again. For us, at least, the fix is pretty easy:

  1. In package.json, change “node-sass”:”^4.9.0” to “sass”:”^1.32.5”
  2. If you’re version of Node (check using “node --version") is 17 or greater, at terminal, run “npm install node@16.0.0 --save-dev”

After #1, "npm install" should work. If you have node version 17 or greater, then #2 is required for "npm run serve" to work.

Spent the last hour trying to see if I can fix this, your solution worked like a charm. Thank you.

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

4 participants