语法错误:phantomjs中未终止的带引号的字符串

时间:2017-10-16 11:03:47

标签: node.js phantomjs

我运行代码时遇到以下错误,

Error: /var/www/courses.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: 1: /var/www/mysite.com.mm/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: Syntax error: Unterminated quoted string

    at Socket.onStderr (/var/www/mysite.com.mm/node_modules/phridge/lib/spawn.js:93:28)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:547:20)

请让我知道如何解决它。感谢。

1 个答案:

答案 0 :(得分:0)

在GitHub上查看以下问题:

您似乎已在一个平台上安装了二进制文件并在另一个平台上运行它们。根据文档,NPM希望您在切换平台时运行npm rebuild,以重建任何特定于平台的依赖项。

另请参阅https://github.com/Medium/phantomjs#cross-platform-repositories了解详情。