Skip to content

node-gyp errors building outdated contextify package during npm install (old D3 dependency) #4655

Closed

Description

@eduardobcastro

This is my docker file:

FROM python:2.7.14-slim-stretch

#node dependencies
RUN apt-get update \
&&  apt-get install -y \
      build-essential \
      curl \
&& rm -rf /var/lib/apt/lists/*

#node 6
RUN apt-get update \
&&  curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&&  apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

#git
RUN apt-get update \
&&  apt-get install -y git-core \
&& rm -rf /var/lib/apt/lists/*

#user
RUN groupadd --gid 1000 node \
  && useradd --uid 1000 --gid node --shell /bin/bash --create-home node

#mongo
RUN apt-get update \
&&  apt-get install -y mongodb \
&& rm -rf /var/lib/apt/lists/*

#code combat dump
RUN mkdir -p /data/db \
&&  mongod --fork --logpath /var/log/mongodb.log \
&&  curl http://analytics.codecombat.com:8080/dump.tar.gz | tar xzf - && mongorestore --drop --noIndexRestore --host 127.0.0.1

#app - download
USER node
RUN cd /home/node \
&&  git clone --depth=1 https://github.com/codecombat/codecombat.git

#app - build
RUN cd /home/node/codecombat \
&&  npm install

ENTRYPOINT ["bash"]

Example error:

> [email protected] install /home/node/codecombat/node_modules/contextify
> node-gyp rebuild

make: Entering directory '/home/node/codecombat/node_modules/contextify/build'
  CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc: In static member function ‘static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)’:
../src/contextify.cc:131:68: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         Local<Object> wrapper = Nan::New(constructor)->NewInstance();
                                                                    ^
In file included from /home/node/.node-gyp/6.14.1/include/node/v8.h:25:0,
                 from /home/node/.node-gyp/6.14.1/include/node/node.h:42,
                 from ../src/contextify.cc:1:
/home/node/.node-gyp/6.14.1/include/node/v8.h:3276:52: note: declared here

There are too many erros to post here.

Am I missing something?

Activity

  1. amithrqb commented on Apr 18, 2018

    @amithrqb

    +1

  2. changed the title [-]Tons of node-gyp of errors during npm install[/-] [+]node-gyp errors building outdated `contextify` package during npm install (old D3 dependency)[/+] on Jul 23, 2018
  3. nwinter commented on Jul 23, 2018

    @nwinter
    Contributor

    I wonder if this is related at all to #4665, where setting the Python path for node-gyp might help? (npm config set python /usr/bin/python2.7).

    Related: #4554 attempts to update D3 version but does not yet use the new D3 API in the front-end.

  4. charlesg99 commented on Sep 12, 2018

    @charlesg99

    +1

  5. faboweb commented on Sep 17, 2018

    @faboweb

    +1

  6. AndrewJakubowicz commented on Apr 5, 2019

    @AndrewJakubowicz
    Contributor

    We've now updated to Node 8 and updated d3 so contextify should no longer be an issue.
    There are still some node-gyp errors that crop up but they shouldn't block development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions