question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npx @backstage/create-app "node" is incompatible with this module

See original GitHub issue

Expected Behavior

npx @backstage/create-app should create a backstage app.

Current Behavior

Yarn install fails:

executing     yarn install ◞ error root@1.0.0: The engine "node" is incompatible with this module. Expected version "12 || 14". Got "9.11.2"

I suspect this is just some incorrect PATH thing and it’s finding an old version of node from Xcode but I just can’t find where it is happening.

Context

backstage-cu$ npx @backstage/create-app
npx: installed 68 in 3.91s
? Enter a name for the app [required] dev-portal
? Select database for the backend [required] PostgreSQL

Creating the app...

...

 Moving to final location:
  moving        dev-portal ✔ 

 Building the app:
  executing     yarn install ◞ error root@1.0.0: The engine "node" is incompatible with this module. Expected version "12 || 14". Got "9.11.2"
error Found incompatible module.
yarn install v1.22.10
info No lockfile found.
[1/5] Validating package.json...
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
  executing     yarn install ✖ 

Could not execute command yarn install

It seems that something went wrong when creating the app 🤔
We are going to clean up, and then you can try again.

 Cleanup:
  remove        temporary directory ✔ 

🔥  Failed to create app!

Possible Solution

Workaround:

  1. cd to the final location
  2. manual run yarn install
dev-portal$ yarn install
yarn install v1.22.10
info No lockfile found.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
...
[5/5] 🔨  Building fresh packages...
success Saved lockfile.
✨  Done in 70.91s.
dev-portal$ dev-portal$ yarn tsc
yarn run v1.22.10
$ tsc
✨  Done in 5.31s.
dev-portal$ yarn --cwd packages/backend start
yarn run v1.22.10
$ backstage-cli backend:dev
Build succeeded
...
2020-12-10T17:06:24.885Z catalog info Wrote 21 entities from location bootstrap:bootstrap in 96ms
2020-12-10T17:06:24.887Z catalog info Locations Refresh: Completed locations refresh in 1.5s

In another terminal:

backstage-cu$ cd dev-portal/
dev-portal$ yarn start
yarn run v1.22.10
$ yarn workspace app start
$ backstage-cli app:serve
Env config file 'app-config.production.yaml' is not loaded as APP_ENV and NODE_ENV-based config loading has been removed
To load the config file, use --config <path>, listing every config file that you want to load
Loaded config from app-config.yaml
fatal: not a git repository (or any of the parent directories): .git
WARNING: Failed to read git commit, ExitCodeError: Command 'git rev-parse HEAD' exited with code 128
fatal: not a git repository (or any of the parent directories): .git
WARNING: Failed to describe git version, ExitCodeError: Command 'git describe --always' exited with code 128
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/alan/src/backstage-cu/dev-portal/packages/app/public
ℹ 「wds」: 404s will fallback to /index.html
ℹ 「wdm」: wait until bundle finished: /catalog/default/api/spotify/definition
ℹ 「wdm」: Compiled successfully.

Steps to Reproduce

  1. npx @backstage/create-app

See Context, above.

Your Environment

  • NodeJS Version (v12): v15.15.1
  • Operating System and Version (e.g. Ubuntu 14.04): MacOS Catalina 10.15.7 (19H15)
  • Browser Information: N/A
backstage-cu$ yarn --version
1.22.10
backstage-cu$ node --version
v14.15.1
backstage-cu$ npx --version
6.14.8
backstage-cu$ which yarn
/usr/local/bin/yarn
backstage-cu$ ls -l /usr/local/bin/yarn
lrwxr-xr-x  1 ac45  admin  31 Nov 30 15:22 /usr/local/bin/yarn@ -> ../Cellar/yarn/1.22.10/bin/yarn

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
n2ygkcommented, Dec 10, 2020

Yeah not that either…

dev-portal$ /usr/bin/env node -v 
v14.15.1
1reaction
n2ygkcommented, Dec 10, 2020
dev-portal$ npx node -v
v14.15.1
dev-portal$ which node
/Users/ac45/.nvm/versions/node/v14.15.1/bin/node
dev-portal$ node -v
v14.15.1
dev-portal$ nvm list
->     v14.15.1
         system
node -> stable (-> v14.15.1) (default)
stable -> 14.15 (-> v14.15.1) (default)
iojs -> N/A (default)
unstable -> N/A (default)
lts/* -> lts/fermium (-> v14.15.1)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.23.0 (-> N/A)
lts/erbium -> v12.20.0 (-> N/A)
lts/fermium -> v14.15.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

npx create-react-app -> The engine "node" is incompatible ...
The fix was that I had installed node via pacman and via Snap Store (I didn't know about it) and I saw in...
Read more >
Create an App - Backstage Demo
To create a Backstage app, you will need to have Node.js Active LTS Release installed ... The easiest way to run the create...
Read more >
The Engine Node is Incompatible | Alexandria Pugia - Medium
You have create-react-app fired up and it's doing it's thing. ... error postcss@8.1.9: The engine “node” is incompatible with this module.
Read more >
Newest 'yarnpkg' Questions - Stack Overflow
I am using webpack, yarn, react from scratch, and tailwind. In dev mode everything works, but in production mode my app won't load...
Read more >
Can'T Install React App Using Npx Create-React ... - ADocLib
Can'T Install React App Using Npx Create-React-App. Node The Engine "Node" Is Incompatible With This Module. If reactscripts is not installed then install ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found