简体   繁体   English

我的节点和 npm 已经是最新版本

[英]my node and npm are already latest version

as u can see i am facing the error in 3rd line ,i did sudo npm install gulp ubuntu@ip-172-31-84-181:~/socialsite$ gulp -v CLI version: 2.3.0 Local version: 4.0.2 before showing this error it was unable to find gulp related modules like sass , rev , undertaker etc so i installed them individually to get rid of them but now i am getting this error i tried to upadte my node nd npm but it shows they are of latest version i also tried to rm rf node_modules but it also did not work ubuntu@ip-172-31-84-181:~/socialsite$ node -v v8.10.0 ubuntu@ip-172-31-84-181:~/socialsite$ npm -v 3.5.2正如你所看到的,我在第三行遇到了错误,我做了 sudo npm install gulp ubuntu@ip-172-31-84-181:~/socialsite$ gulp -v CLI version: 2.3.0 Local version: 4.0.2在显示此错误之前,它无法找到与 gulp 相关的模块,例如 sass 、 rev 、承办者等,因此我单独安装了它们以摆脱它们,但现在出现此错误,我尝试更新我的节点 nd npm 但它显示它们属于最新版本我也尝试 rm rf node_modules 但它也不起作用 ubuntu@ip-172-31-84-181:~/socialsite$ node -v v8.10.0 ubuntu@ip-172-31-84-181:~ /socialsite$ npm -v 3.5.2

ubuntu@ip-172-31-84-181:~/socialsite$ gulp build
/home/ubuntu/socialsite/node_modules/globby/index.js:28
        } catch {
                ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> 
(/home/ubuntu/socialsite/node_modules/del/index.js:4:16)

运行npm rebuild命令可能有助于解决问题

将节点版本从 8.0.0 更新到 14.0.0 就好了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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