简体   繁体   中英

gulp serve : module.js 471 , Error : cannot find module './build/release/encode.node'

I try to make vagrant box for MEAN project from my win 10 . mein env :

  • nodejs : v6.9.4
  • npm : v4.2.0
  • gulp : CLI v1.2.2

  • $ yo angular-fullstack
  • $ sudo npm install
  • $ gulp serve

    I got the error module.js 471 , Error : cannot find module './build/release/encode.node'

I try :

  • $ sudo npm cache clean
  • $ rm -rf node_modules
  • $ sudo npm install

How can solve this error !!

I just solve a same issue with yours. why don't you try this? (thats what I did and it solves my problem)

  • $sudo rm -rf node_modules
  • $npm cache clean
  • $npm install (w/o sudo)

(I think the reason is sudo npm install makes root's directory which non root user cannot access, and you run gulp serve as non root user mode.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM