0

Configuring VUE-CLI I am having the next problem:

internal/modules/cjs/loader.js:596 throw err; ^

Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/usr/local/bin/vue:3:15)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)

I have tried to install the module globally but with the same result, when I type in the terminal vueerror appears again.

Could you tell me please how to fix this problem?

inane
  • 626
  • 10
  • 26
  • if you are using hosting platforms like heroku you need to build your app before uploading it to the server – samayo Jun 02 '18 at 23:04
  • No, at the moment this problem is in local installation.. – inane Jun 02 '18 at 23:06
  • them make sure it's built – samayo Jun 02 '18 at 23:11
  • As far I know, it is needed to instance vue command to create a new app skeleton, if I cannot use that instruction I cannot to build it.. – inane Jun 02 '18 at 23:18
  • yeah, but sometimes it works if you build. I got that library issue many times you can see here someone also got it and solved it the same way https://stackoverflow.com/questions/50611909/some-troubles-with-deploying-vue-js-to-heroku#comment88234249_50611909 – samayo Jun 02 '18 at 23:36
  • with vue-build?? it is not working for me.. – inane Jun 02 '18 at 23:50

2 Answers2

0

It was fixed adding the correct PATHS in the .zshrc file, I was adding them to the bash_profile but I am working with other shell.

inane
  • 626
  • 10
  • 26
-1

see the error "Error: Cannot find module 'chalk'" try npm install chalk

gfly
  • 1,508
  • 1
  • 9
  • 5