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

node and npm in sdk environment issue #48

Open
TapioTaSo opened this issue Jun 25, 2024 · 3 comments
Open

node and npm in sdk environment issue #48

TapioTaSo opened this issue Jun 25, 2024 · 3 comments

Comments

@TapioTaSo
Copy link

Hi,

I have setup sdk environment and I have run install-sdk script. After that I can build snap and run sample codes line Nodejs Hello-world. Now I want to write simple server with expressjs, but it seems that there is no npm package manager installed to sdk environment so its hard to fetch new packet like expressjs. I tried to run install-node-npm script and it do something but if I try to run npm I get answer "boschrexroth@app-builder-amd64:~$ npm
/snap/node/8723/bin/node: /lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.30' not found (required by /snap/node/8723/bin/node) /snap/node/8723/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /snap/node/8723/bin/node)
/snap/node/8723/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /snap/node/8723/bin/node) /snap/node/8723/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /snap/node/8723/bin/node)" IS there some technical problem or do I use this just wrong way?

@albrecht-j
Copy link
Collaborator

Hi @TapioTaSo
what version of your app build environment?
Is it based on ubuntu 20 or based on ubuntu 22?
Also the node version is nice to know.

Thanks

@TapioTaSo
Copy link
Author

ubuntu is 20 based (20.04.6 LTS)

Should there be some node after I have run install-sdk script. Should I also run install-node-npm script? Or should I install node from apt?

After install-sdk snap list doesn't not list node. And node --version doesn't not work either.
So I can't say anything about node version.

@ZmRZjFuDsDiR4qi5801F
Copy link
Collaborator

ZmRZjFuDsDiR4qi5801F commented Jul 1, 2024

Hi @TapioTaSo, @albrecht-j, Node versions >= 20 LTS are based on core22 (requested by us, because of Datalayer API), so running on a core20 image is missing some matching libs e.g. GLIBC_2.34. Installing the core22 snap won't help here, because of the snap confinement. So if you don't use the Datalayer API, you can flash your system with a core22 image or try installing a core20 compatible node:

sudo snap install node --channel=18/stable --classic

You can check and test your node with

node --version
npm --version
npm info npm

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

No branches or pull requests

3 participants