当先锋百科网

首页 1 2 3 4 5 6 7

Error

  • windows 安装 serverless 报错.

    $ npm i serverless -g
    C:\Users\unofficial\AppData\Roaming\npm\sls -> C:\Users\unofficial\AppData\Roami                                                                                                                                                                                               ng\npm\node_modules\serverless\bin\serverless
    C:\Users\unofficial\AppData\Roaming\npm\serverless -> C:\Users\unofficial\AppDat                                                                                                                                                                                               a\Roaming\npm\node_modules\serverless\bin\serverless
    C:\Users\unofficial\AppData\Roaming\npm\slss -> C:\Users\unofficial\AppData\Roam                                                                                                                                                                                               ing\npm\node_modules\serverless\bin\serverless
    
    > [email protected] postinstall C:\Users\unofficial\AppData\Roaming\npm\node_mod                                                                                                                                                                                               ules\serverless
    > node ./scripts/postinstall.js
    
    fs.js:653
      return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                     ^
    
    Error: ENOENT: no such file or directory, open 'C:\Users\unofficial\AppData\Roam                                                                                                                                                                                               ing\npm\node_modules\serverless\node_modules\tabtab\scripts\D:\soft\Git\usr\bin\                                                                                                                                                                                               bash.sh'
        at Object.fs.openSync (fs.js:653:18)
        at fs.readFileSync (fs.js:554:33)
        at Complete.script (C:\Users\unofficial\AppData\Roaming\npm\node_modules\ser                                                                                                                                                                                               verless\node_modules\tabtab\src\complete.js:373:14)
        at Installer.writeTo (C:\Users\unofficial\AppData\Roaming\npm\node_modules\s                                                                                                                                                                                               erverless\node_modules\tabtab\src\installer.js:91:34)
        at Installer.handle (C:\Users\unofficial\AppData\Roaming\npm\node_modules\se                                                                                                                                                                                               rverless\node_modules\tabtab\src\installer.js:80:21)
        at Commands.install (C:\Users\unofficial\AppData\Roaming\npm\node_modules\se                                                                                                                                                                                               rverless\node_modules\tabtab\src\commands\index.js:75:22)
        at Object.<anonymous> (C:\Users\unofficial\AppData\Roaming\npm\node_modules\                                                                                                                                                                                               serverless\node_modules\tabtab\src\cli.js:33:16)
        at Module._compile (module.js:624:30)
        at Object.Module._extensions..js (module.js:635:10)
        at Module.load (module.js:545:32)
    Could not auto-install serverless autocomplete script.
    Please copy / paste the script above into your shell.
    [email protected]
    updated 1 package in 54.116s  
    

    其中执行命令行 node ./scripts/postinstall.js 时报错与 tabtab 的参数 --auto 相关。手动删除 postinstall.js--auto 后再次执行命令行。( https://github.com/serverless...