reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.26k stars 2.16k forks source link

Node versioning issue #6865

Open manoj-kumar-tcgls opened 7 months ago

manoj-kumar-tcgls commented 7 months ago

As per the docs reaction requires node v14 or v15, but after cloning the code for npm install node v18 is required and after that for running the code node v14 or v15 is required. and after i do npm install with node v18 i getting error. npm ERR! code ETARGET npm ERR! notarget No matching version found for @reactioncommerce/api-core@3.0.0. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn't exist.

cacaedlsc commented 5 months ago

when I got this error, I changed the version of the dependency in package.json file into the versions that available. the command is $ npm info [name of dependency you want to check] versions, and when you got the new version, go to package.json and change the version right

fre2mansur commented 5 months ago

package

can you tell where and what you changed the version please?

image

cacaedlsc commented 5 months ago

for this case, it seems not have any relation with version. As I remember, when I got this error, I searched a file named getFilesFromRepo.js and do something with the code but I am not really sure which one. While you find the file, copy the code and the error to the chatgpt or else, they might help you, bcs I use them as well

issar13 commented 2 months ago

completel not working for me.

pegahes commented 2 weeks ago

I have the same problem. when I use node version 14 or 15, the reaction cli throws error. The error is different based on which version of node I am using(14 or 15) but it is related to a syntax error in a file related to reaction cli somewhere in the installed folder. Also when I use node version 20, reaction cli seems to work fine (reaction help does not throw errors) but I can not create a project. This is the error I get with node 15:

node:internal/modules/cjs/loader:924
  const err = new Error(message);
              ^
Error: Cannot find module 'node:tty'

this is the error I get with node 14:

    input ||= this.rawDefault;
          ^^^

SyntaxError: Unexpected token '||='
    at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18)