drbz99867 2018-08-17 08:07
浏览 467

'node'不被识别为内部或外部命令,可操作程序或批处理文件。 - Browsershot

I have installed Browsershot to Laravel the same way like here (https://github.com/spatie/browsershot ) and when I try to do something it gives me this error.

The command "node "C:\xp\htdocs\staticit\vendor\spatie\browsershot\src/../bin/browser.js" "{\"url\":\"https://google.com\",\"action\":\"screenshot\",\"options\":{\"type\":\"png\",\"path\":\"C:\xp\htdocs\staticit\app\Http\Controllers/temp/testScreenshot.png\",\"args\":[],\"viewport\":{\"width\":800,\"height\":600}}}"" failed. Exit Code: 1(General error) Working directory: C:\xp\htdocs\staticit\public Output: ================ Error Output: ================ 'node' is not recognized as an internal or external command, operable program or batch file.

I have installed node modules in my Laravel project root folder and when I write node -v in my cmd it is recognized.

**Note: I'm using Win7 , Laravel 5.7 and node ,php latest version.

  • 写回答

1条回答 默认 最新

  • duanlei2458 2018-11-02 21:37
    关注

    So the problem was that my OS is Windows, when I switched to Ubunto everething worked fine. I have opened this issue in the github repo of the creator, but he closed it because he dosen't use Windows.

    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度