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

Problem with alpine branch #18

Closed
NewOldMax opened this issue Oct 20, 2016 · 1 comment
Closed

Problem with alpine branch #18

NewOldMax opened this issue Oct 20, 2016 · 1 comment

Comments

@NewOldMax
Copy link

Hi!
I use your image to install and build npm packages
docker run -it --rm -v $(pwd):/data mkenney/npm npm install --prefix /data
before switch to alpine, it works fine (currently all works with debian branch).
In alpine branch case i have error:

gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/6.2.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/data/node_modules/bufferutil/.node-gyp"
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:117:15)
gyp ERR! System Linux 3.13.0-83-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /data/node_modules/bufferutil
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
...
...
npm ERR! Linux 3.13.0-83-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--prefix" "/data"
npm ERR! node v6.2.2
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! bufferutil@1.2.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.2.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bufferutil package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs bufferutil
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /src/npm-debug.log

My package.json

  "dependencies": {
    "bootstrap-less": "3.3.8",
    "flux": "3.1.0",
    "react": "15.3.2",
    "react-dom": "15.3.2",
    "react-router": "2.8.1",
    "material-ui": "0.16.1",
    "less": "2.7.1",
    "font-awesome": "4.6.3",
    "react-tap-event-plugin": "1.0.0",
    "classnames": "2.2.5",
    "query-string": "4.2.3",
    "react-paginate": "2.2.3",
    "moment": "2.14.1",
    "react-intl":"2.1.5",
    "autobahn-react":"0.3.1",
    "jwt-payload-decoder":"1.2.4",
    "react-count-to": "0.5.1",
    "mime-types": "2.1.12",
    "promise-polyfill": "6.0.2"
  },
  "devDependencies": {
    "babelify": "7.3.0",
    "browser-sync": "2.17.5",
    "browserify": "13.1.0",
    "eslint": "3.8.1",
    "nodemon": "1.11.0",
    "rework": "1.0.1",
    "rework-npm": "1.0.0",
    "rework-npm-cli": "0.1.1",
    "serve": "1.4.0",
    "uglify-js": "2.7.3",
    "watchify": "3.7.0",
    "bufferutil": "1.2.1",
    "utf-8-validate": "1.2.1"
  }
@mkenney
Copy link
Owner

mkenney commented Oct 20, 2016

Hi @NewOldMax

The reason it fails is because the Alpine image doesn't include any build tools (gcc, make, etc.). Those are left out intentionally because they increase the image size by about 100MB, which kind of defeats the purpose of the alpine image (keeping it small).

For tools that require compilation tasks you're going to need to use the Debian image (mkenney/npm:debian), I'm not worried about that image's size and it includes build tools for various compilation tasks (node-sass, node-gyp, etc.). Let me know if that doesn't meet your needs, thanks!

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