Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Installing in docker is broken #6

@Rush

Description

@Rush
> docker pull node
> docker run -it node /bin/bash
root@4a251ed35176:/# mkdir test
root@4a251ed35176:/# cd test
root@4a251ed35176:/test# npm init -y
root@4a251ed35176:/test# npm install --save fast-xml2js
npm info it worked if it ends with ok
npm info using npm@3.10.3
npm info using node@v6.5.0
npm info attempt registry request try #1 at 9:36:57 PM
npm http request GET https://registry.npmjs.org/fast-xml2js
npm http 304 https://registry.npmjs.org/fast-xml2js
npm info addNameTag [ 'fast-xml2js', 'latest' ]
npm info lifecycle fast-xml2js@1.0.7~preinstall: fast-xml2js@1.0.7
npm WARN lifecycle fast-xml2js@1.0.7~preinstall: cannot run in wd %s %s (wd=%s) fast-xml2js@1.0.7 node-gyp configure && node-gyp build /test/node_modules/.staging/fast-xml2js-5c4308bb
npm info linkStuff fast-xml2js@1.0.7
npm info lifecycle fast-xml2js@1.0.7~install: fast-xml2js@1.0.7
npm info lifecycle fast-xml2js@1.0.7~postinstall: fast-xml2js@1.0.7
test@1.0.0 /test
`-- fast-xml2js@1.0.7 

npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm info ok
root@4a251ed35176:/test# node -r fast-xml2js -e 'true'   
module.js:457
    throw err;
    ^

Error: Cannot find module './fast-xml2js/fast-xml2js.node'
    at Function.Module._resolveFilename (module.js:455:15)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/test/node_modules/fast-xml2js/index.js:1:80)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)

This has something to do with the way node-gyp is set up with this package: http://stackoverflow.com/a/19132229/403571

It seems the workaround is npm install --unsafe-perm.

The problem does not exist in other native modules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions