Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some dependencies cannot be compile on Mac OS #16

Open
Zyigh opened this issue Oct 7, 2019 · 2 comments
Open

Some dependencies cannot be compile on Mac OS #16

Zyigh opened this issue Oct 7, 2019 · 2 comments

Comments

@Zyigh
Copy link

Zyigh commented Oct 7, 2019

Problem :

I can't run the program because my version of mac os is not compatible with some node module

Mac OS version : 10.14.6

The message I get :

Module build failed: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (72)

Notes

I had to downgrade from Node 12 to Node 8 before I got this message. Node 12 couldn't reach this point.

Fix

I fixed it using Docker to have an environment replicable and more stability for sharing the code, this may probably be added to source code. I chose Apache for easy configuration (with php-apache images) but nginx should be quite much longer to setup. This might need a bit changes but it seems quite ok

### Composer
FROM composer:1.9 AS build-api

WORKDIR /build

ADD / .
RUN composer install --no-ansi --no-dev --no-plugins --no-scripts --no-suggest --optimize-autoloader

### NPM
FROM node:8 AS build-front

WORKDIR /build

COPY --from=build-api /build .
RUN npm install
RUN npm run production

### Running
FROM php:7.3-apache AS homestead

WORKDIR /var/www/html

ENV APACHE_DOCUMENT_ROOT /var/www/html/public

RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

COPY --from=build-front /build .
RUN chown -R www-data .
RUN php artisan key:generate
RUN php artisan migrate --seed
@Zyigh
Copy link
Author

Zyigh commented Oct 7, 2019

Also note that due to the api not running on the host machine, I had to configure cors in Laravel API

@kohenkatz
Copy link

See sass/node-sass#2731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants