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

How to install in Docker? #28

Open
mcandre opened this issue Feb 14, 2019 · 1 comment
Open

How to install in Docker? #28

mcandre opened this issue Feb 14, 2019 · 1 comment

Comments

@mcandre
Copy link

mcandre commented Feb 14, 2019

Hi, I can install packages with npm most of the time, but when I run npm install -g webassembly in a Docker container from library/debian:buster, then I get an error at the end of the installation:

# npm install -g webassembly
npm WARN npm npm does not support Node.js v10.15.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
/usr/local/bin/wa -> /usr/local/lib/node_modules/webassembly/bin/wa
/usr/local/bin/wa-compile -> /usr/local/lib/node_modules/webassembly/bin/wa-compile
/usr/local/bin/wa-assemble -> /usr/local/lib/node_modules/webassembly/bin/wa-assemble
/usr/local/bin/wa-disassemble -> /usr/local/lib/node_modules/webassembly/bin/wa-disassemble

> webassembly@0.11.0 postinstall /usr/local/lib/node_modules/webassembly
> node scripts/setup

fs.js:115
    throw err;
    ^

Error: EACCES: permission denied, open '/usr/local/lib/node_modules/webassembly/wa-tools-3287gDj9vAX5jff0.tmp'
    at Object.openSync (fs.js:439:3)
    at Object._createTmpFileSync [as fileSync] (/usr/local/lib/node_modules/webassembly/node_modules/tmp/lib/tmp.js:266:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/webassembly/scripts/setup.js:18:16)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webassembly@0.11.0 postinstall: `node scripts/setup`
npm ERR! Exit status 1

Any tips for resolution?

@mikeheddes
Copy link

You could try running as sudo sudo npm install -g webassembly. Or alternatively you could try to install it in a project, meaning you create a project with npm init -y and then install webassembly with npm install webassembly. To run commands that are locally installed you can use npx. So the command to compile becomes npx wa ....

Hope this helps.

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