zoukankan      html  css  js  c++  java
  • ubuntu 运行ndoejs问题

    y@ty-Virtual-Machine:~/work/mmpayxdclog$ sudo npm run dev
    [sudo] ty 的密码: 
    
    > mmpayxdcnodejskoa@1.0.0 dev /home/ty/work/mmpayxdclog
    > cross-env RUN_ENV=dev nodemon scripts/serve.js
    
    sh: 1: cross-env: Permission denied
    npm ERR! code ELIFECYCLE
    npm ERR! errno 126
    npm ERR! mmpayxdcnodejskoa@1.0.0 dev: `cross-env RUN_ENV=dev nodemon scripts/serve.js`
    npm ERR! Exit status 126
    npm ERR! 
    npm ERR! Failed at the mmpayxdcnodejskoa@1.0.0 dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2021-07-13T05_40_55_222Z-debug.log
    

    解决办法:
    ty@ty-Virtual-Machine:~/work/mmpayxdclog$ sudo chmod -R a+x node_modules
    再重新运行

    ty@ty-Virtual-Machine:~/work/mmpayxdclog$ sudo npm run dev
    
    > mmpayxdcnodejskoa@1.0.0 dev /home/ty/work/mmpayxdclog
    > cross-env RUN_ENV=dev nodemon scripts/serve.js
    
    [nodemon] 2.0.6
    [nodemon] to restart at any time, enter `rs`
    [nodemon] watching path(s): *.*
    [nodemon] watching extensions: js,mjs,json
    [nodemon] starting `node scripts/serve.js`
    process.uncaughtException process will exit with 1000 5809 Error: Cannot find module '../config/config_oringal1'
    Require stack:
    - /home/ty/work/mmpayxdclog/models/cluster.js
    - /home/ty/work/mmpayxdclog/models/search.js
    - /home/ty/work/mmpayxdclog/controllers/mmpay_plog_api/search/index.js
    - /home/ty/work/mmpayxdclog/controllers/mmpay_plog_api/index.js
    - /home/ty/work/mmpayxdclog/router.js
    - /home/ty/work/mmpayxdclog/app.js
    - /home/ty/work/mmpayxdclog/scripts/serve.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
        at Function.Module._load (internal/modules/cjs/loader.js:746:27)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Object.<anonymous> (/home/ty/work/mmpayxdclog/models/cluster.js:2:16)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:14)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Object.<anonymous> (/home/ty/work/mmpayxdclog/models/search.js:2:17)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    
    写入自己的博客中才能记得长久
  • 相关阅读:
    Visual C#动态生成控件
    (转)GridView 72般绝技
    ASP.NET给DataGrid,Repeater等添加全选批量删除等功能(转)
    JS操作字符串
    在IE中调试客户端脚
    一组很棒的button样式 (转)
    c#实现随机字符串(不包含数字)
    1996年4月全国计算机等级考试二级C语言笔试试题
    ASP.NET 2.0站点登录、导航与权限管理 转
    1996年9月全国计算机等级考试二级C语言笔试试题
  • 原文地址:https://www.cnblogs.com/heris/p/15006550.html
Copyright © 2011-2022 走看看