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

add --no-optional to npm install to skip the build error #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /usr/src/app

# Install app dependencies
COPY ./* /usr/src/app/
RUN npm install
RUN npm install --no-optional

# Bundle app source
COPY . /usr/src/app
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Dependencies:
Then check out the project and run:

```sh
npm install
npm install --no-optional
```

### Running
Expand Down Expand Up @@ -58,3 +58,4 @@ ports:
* If latest version also produces errors, try installing v4.5.0.
* An easy fix for that would be [to use `nvm`](http://stackoverflow.com/a/7718438/1585523).
* If you get any node-sass errors, try running `npm rebuild node-sass --force` or the remove `node_modules` folder and run `npm install` again
* As 2019 March, npm install won't work due to native module build errors. Use "npm install --no-optional" to skip native build.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
wittr:
image: node:latest
container_name: c-wittr
command: /bin/bash -c "if [ ! -d node_modules ] ; then npm install ; fi && npm run serve"
command: /bin/bash -c "if [ ! -d node_modules ] ; then npm install --no-optional ; fi && npm run serve"
working_dir: /usr/src/app
volumes:
- .:/usr/src/app
Expand Down
Loading