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

🐛 Bug Report: Yarn install failing on app creation #28081

Open
2 tasks done
phil123456 opened this issue Dec 10, 2024 · 3 comments
Open
2 tasks done

🐛 Bug Report: Yarn install failing on app creation #28081

phil123456 opened this issue Dec 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@phil123456
Copy link

📜 Description

following https://backstage.io/docs/getting-started/

running:

npx @backstage/create-app@latest

👍 Expected behavior

from the doc, it should build the app

👎 Actual Behavior with Screenshots

yet it fails miserably

image

👟 Reproduction steps

I installed these

sudo apt-get update
sudo apt install make build-essential curl wget ca-certificates git python g++ cmake gcc -y

install nodejs
https://github.com/nvm-sh/nvm#install--update-script
https://nodejs.org/en/about/previous-releases

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm --version
23.3.0
nvm install 23.3.0

npm install -g yarn
yarn --version
1.22.22

What I tried so far

  • I installed make build-essential curl wget ca-certificates git python g++ cmake gcc -y
  • I used another VM with more mem/cpu
  • I tried with another older ubuntu 20.04
  • I used yarn install with npm install -g yarn -> yarn 1.22.22
  • tried creating the app again after apt install upgrade
  • tired another version : yarn set version 1.22.19
  • tried with prior nvm version : nvm install 16.20.0 & nvm install 16.20.0
  • tried installing yarn like that instead (first removing with npm)
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn

📃 Provide the context for the Bug.

let me know where to find the logs

🖥️ Your Environment

VM : Ubuntu 20.4 and 24.4
Virtual box on Win 10

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

@phil123456 phil123456 added the bug Something isn't working label Dec 10, 2024
@Rugvip
Copy link
Member

Rugvip commented Dec 10, 2024

Hmm, anything useful in the error logs linked by Yarn? Especially the isolated-vm and better-sqlite3 ones?

@phil123456
Copy link
Author

phil123456 commented Dec 11, 2024

running yarn install I get log files with the same error

g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?

make: Entering directory '/home/myhome/backstage/my-backstage/node_modules/isolated-vm/build'
  CXX(target) Release/obj.target/nortti/src/isolate/allocator_nortti.o
  CXX(target) Release/obj.target/nortti/src/external_copy/serializer_nortti.o
g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
make: *** [nortti.target.mk:161: Release/obj.target/nortti/src/external_copy/serializer_nortti.o] Error 1
make: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
make: *** [nortti.target.mk:161: Release/obj.target/nortti/src/isolate/allocator_nortti.o] Error 1
make: Leaving directory '/home/myhome/backstage/my-backstage/node_modules/isolated-vm/build'

@phil123456
Copy link
Author

phil123456 commented Dec 11, 2024

I installed g++-10 (AND even then g++-11)

and it is still complaining 20 is not there

I even output the c++ version in a test program

cat test.cpp 

#include <iostream>
int main() {
    std::cout << "__cplusplus: " << __cplusplus << std::endl;
    return 0;
}

g++ -v -std=c++20 test.cpp -o test

./test 
__cplusplus: 202002

I have no other c++ installed on my machine

ls /usr/bin/g++* -lha
lrwxrwxrwx 1 root root 15 Dez 11 11:22 /usr/bin/g++ -> /usr/bin/g++-11
lrwxrwxrwx 1 root root 23 Jul 11  2023 /usr/bin/g++-11 -> x86_64-linux-gnu-g++-11

but I noticed the make file uses 2 c++ standards

image

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build', '--jobs', 4 ]
make: Entering directory '/home/phil/WORK/backstage/backstage/node_modules/isolated-vm/build'
  CXX(target) Release/obj.target/nortti/src/external_copy/serializer_nortti.o
  CXX(target) Release/obj.target/nortti/src/isolate/allocator_nortti.o
In file included from /home/phil/.cache/node-gyp/23.3.0/include/node/cppgc/common.h:8,
                 from /home/phil/.cache/node-gyp/23.3.0/include/node/v8.h:23,
                 from ../src/isolate/allocator.h:2,
                 from ../src/isolate/allocator_nortti.cc:1:
/home/phil/.cache/node-gyp/23.3.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
   13 | #error "C++20 or later required."
      |  ^~~~~
In file included from /home/phil/.cache/node-gyp/23.3.0/include/node/cppgc/common.h:8,
                 from /home/phil/.cache/node-gyp/23.3.0/include/node/v8.h:23,
                 from ../src/external_copy/external_copy.h:2,
                 from ../src/external_copy/serializer.h:2,
                 from ../src/external_copy/serializer_nortti.cc:1:
/home/phil/.cache/node-gyp/23.3.0/include/node/v8config.h:13:2: error: #error "C++20 or later required."
   13 | #error "C++20 or later required."
      |  ^~~~~
In file included from ../src/external_copy/external_copy.h:12,
                 from ../src/external_copy/serializer.h:2,
                 from ../src/external_copy/serializer_nortti.cc:1:
../src/isolate/util.h:30:40: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                        NonCopyablePersistentTraits
../src/isolate/util.h:30:65: error: template argument 2 is invalid
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {
      |                                                                 ^
../src/isolate/util.h:30:40: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                        NonCopyablePersistentTraits
../src/isolate/util.h:30:66: error: template argument 2 is invalid
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {
      |                                                                  ^~
../src/isolate/util.h:30:40: error: ‘CopyablePersistentTraits’ is not a member of ‘v8’; did you mean ‘NonCopyablePersistentTraits’?
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                        NonCopyablePersistentTraits
../src/isolate/util.h:30:66: error: template argument 2 is invalid
   30 | auto Deref(const v8::Persistent<T, v8::CopyablePersistentTraits<T>>& handle) -> v8::Local<T> {

@phil123456 phil123456 changed the title 🐛 Bug Report: <title>Yarn install failing on app creation 🐛 Bug Report: Yarn install failing on app creation Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants