Npm启动错误

时间:2016-07-08 11:36:18

标签: angular npm localhost npm-start

我开始做一些Angular教程,我无法在OSX Yosemite上启动npm。

以下是错误日志。我似乎已按照说明操作,但无法在localhost:3000上看到已编译的应用程序。

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'lite' ]
2 info using npm@2.15.8
3 info using node@v4.4.7
4 verbose run-script [ 'prelite', 'lite', 'postlite' ]
5 info prelite media-watch-list@1.0.0
6 info lite media-watch-list@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info media-watch-list@1.0.0 Failed to exec lite script
9 verbose stack Error: media-watch-list@1.0.0 lite: `lite-server`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at EventEmitter.emit (events.js:172:7)
9 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack     at emitTwo (events.js:87:13)
9 verbose stack     at ChildProcess.emit (events.js:172:7)
9 verbose stack     at maybeClose (internal/child_process.js:827:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid media-watch-list@1.0.0
11 verbose cwd /Users/ross/Sites/lynda/exercisefiles/c2/02-01-start
12 error Darwin 14.5.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "lite"
14 error node v4.4.7
15 error npm  v2.15.8
16 error code ELIFECYCLE
17 error media-watch-list@1.0.0 lite: `lite-server`
17 error Exit status 1
18 error Failed at the media-watch-list@1.0.0 lite script 'lite-server'.
18 error This is most likely a problem with the media-watch-list package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     lite-server
18 error You can get information on how to open an issue for this project with:
18 error     npm bugs media-watch-list
18 error Or if that isn't available, you can get their info via:
18 error
18 error     npm owner ls media-watch-list
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:1)

问题得到解决。真正的问题不是连接到localhost:3000,     但是导轨没有正确安装。     当我运行&#34; rails server&#34;有一条错误行说:

{
        Process p;
    try
    { 
        //  Run root command
        p = Runtime.getRuntime().exec("su"); 

        // Attempt to write a file to system
        DataOutputStream os = new DataOutputStream(p.getOutputStream()); 
        os.writeBytes("echo \"Do I have root?\" >/system/temporary.txt\n");

        // Close the stream
        os.writeBytes("exit\n"); 
        os.flush(); 
        try
        { 
            p.waitFor(); 
            if (p.exitValue() != 255)
            { 
                // Code to run on ROOTED
                //  NOTHING JUST GO FORWARD
            }
            else
            { 
                // Code to run on NON ROOTED

            } 
        }
        catch (InterruptedException e)
        { {
            // TODO Code to run with interrupted exception

            }
        } 
    }
    catch (IOException e)
    { 
        // TODO Code to run in input/output exception

    }}}