Laravel NPM 依赖项的 Spark 错误

Laravel Spark error with NPM Dependencies

从 Laravel 安装 Spark,在 Docker 容器 运行ning Debian 8 中,当我 运行 NPM 更新时,我收到以下错误,我没有知道如何修复它。

Installing NPM Dependencies...                 
npm WARN deprecated express@2.5.11: express 2.x series is deprecated                           
npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated                            
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):        
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! path /application/project/node_modules/js-beautify/js/bin/html-beautify.js             
npm ERR! code ENOENT   
npm ERR! errno -2      
npm ERR! syscall chmod 
npm ERR! enoent ENOENT: no such file or directory, chmod '/application/project/node_modules/js-beautify/js/bin/html-beautify.js'
npm ERR! enoent This is related to npm not being able to find a file.                          
npm ERR! enoent        

npm ERR! A complete log of this run can be found in:                                           
npm ERR!     /root/.npm/_logs/2017-09-18T15_34_15_041Z-debug.log

$ node -v v8.5.0

$ npm -v 5.3.0

有什么建议吗?

更新

这里是docker-compose.yml所有服务

version: "3.1"
services:

    redis:
        image: redis:alpine
        container_name: pr-redis

    rabbitmq:
        image: rabbitmq:alpine
        container_name: pr-rabbitmq

    mysql:
      image: mysql:8.0
      container_name: pr-mysql
      working_dir: /application
      environment:
        - MYSQL_ROOT_PASSWORD=root
        - MYSQL_DATABASE=database
        - MYSQL_USER=database
        - MYSQL_PASSWORD=database

    webserver:
      image: nginx:alpine
      container_name: pr-webserver
      working_dir: /application
      volumes:
          - ./htdoc:/application
          - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
      ports:
       - "80:80"
       - "9002:9002"
      links:
       - php-fpm

    php-fpm:
      build:
        context: .
        dockerfile: phpdocker/php-fpm/Dockerfile
      container_name: pr-php-fpm
      working_dir: /application
      environment:
        XDEBUG_CONFIG: "remote_host=172.18.0.1"
        PHP_IDE_CONFIG: "serverName=dev.local"
      volumes:
        - ./htdoc:/application
        - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.0/fpm/conf.d/99-overrides.ini

      links:
        - mysql
        - rabbitmq

这里是 Docker 包含所有要安装的软件包和要添加的新源的文件。

FROM phpdockerio/php7-fpm:latest

# Install extensions and other stuff
RUN apt-get update \
        && apt-get -y --no-install-recommends install apt-transport-https lsb-release ca-certificates \
        && curl -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
        && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list \
        && curl -sL https://deb.nodesource.com/setup_8.x | bash - \
        && apt-get update \
        && apt-get -y --no-install-recommends install php7.0-mysql php7.0-mbstring php7.0-xdebug php7.0-xsl \
        php7.0-curl php7.0-json php7.0-bcmath php7.0-mcrypt php7.0-soap php7.0-intl php7.0-bcmath php7.0-gd \
        php7.0-redis php7.0-sqlite3 nodejs \
        mysql-client vim

# Install laravel envoy
RUN composer global require "laravel/envoy"

# Install laravel installer
RUN composer global require "laravel/installer"

# Install spark installer
RUN composer global require "laravel/spark-installer"

# Install gulp
RUN /usr/bin/npm install -g gulp

# Install bower
RUN /usr/bin/npm install -g bower

# Cleanup
RUN  apt-get clean && apt-get update && apt-get upgrade -y && apt-get autoclean && apt-get autoremove; \
        rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*


# File permissions workaround
#RUN usermod -u 1000 www-data

WORKDIR "/application"

我解决了 运行 节点 LTS 版本 (6.11.3) 的问题,它没有给出与 Node.js 所有相同的问题。

现在一切正常