reacttips-dev / stylex

Write CSS-in-JS with atomic support. Like Facebook's Stylex!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install dependecies with node 12.4.0 and yarn

adamward459 opened this issue · comments

I cannot install depencies when forking project with yarn 1.22.10 and node 12.4.0 but npm it's fine

Steps:

  • Cd to project
  • Run yarn

Result

$ yarn
yarn install v1.22.10
[1/4] Resolving packages...
Couldn't find any versions for "@ladifire-opensource/stylex-webpack-plugin" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/stylex
-webpack-plugin" from this list: (Use arrow keys)
Couldn't find any versions for "@ladifire-opensource/stylex" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/stylex
" from this list: (Use arrow keys)
Couldn't find any versions for "@ladifire-opensource/babel-plugin-transform-stylex" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/babel-
plugin-transform-stylex" from this list: (Use arrow keys)
> 0.0.1-beta.0 (node:13924) MaxListenersExceededWarning: ? Please choose a version of "@ladifire-opensource/babel-
plugin-transform-stylex" from this list: 0.0.1-beta.0
[2/4] Fetching packages...
info fsevents@2.3.1: The platform "win32" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
error @parcel/source-map@2.0.0-alpha.4.19: The engine "node" is incompatible with this module. Expected version "^10 || ^12.18.3 || >=14". Got "12.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Also i cannot install depencies in styles-reactjs-examples:

Steps:

** cd packages/styles-reactjs-examples
** run yarn || npm i

Result

  • yarn
ASUS@DevPham MSYS /d/github.com/stylex/packages/stylex-reactjs-examples (main)
$ yarn
yarn install v1.22.10
[1/4] Resolving packages...
Couldn't find any versions for "@ladifire-opensource/stylex" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/stylex
" from this list: (Use arrow keys)
Couldn't find any versions for "@ladifire-opensource/babel-plugin-transform-stylex" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/babel-
plugin-transform-stylex" from this list: (Use arrow keys)
Couldn't find any versions for "@ladifire-opensource/stylex-webpack-plugin" that matches "0.0.1-beta1"
? Please choose a version of "@ladifire-opensource/stylex
-webpack-plugin" from this list: (Use arrow keys)
> 0.0.1-beta.0 (node:14120) MaxListenersExceededWarning: ? Please choose a version of "@ladifire-opensource/stylex
-webpack-plugin" from this list: 0.0.1-beta.0
[2/4] Fetching packages...
info fsevents@2.3.1: The platform "win32" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
error @parcel/source-map@2.0.0-alpha.4.19: The engine "node" is incompatible with this module. Expected version "^10 || ^12.18.3 || >=14". Got "12.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
  • npm
ASUS@DevPham MSYS /d/github.com/stylex/packages/stylex-reactjs-examples (main)
$ npm i
npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ladifire-opensource/stylex@0.0.1-beta1
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'stylex-reactjs-examples'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ASUS\AppData\Roaming\npm-cache\_logs\2021-01-21T16_48_55_273Z-debug.log

@phamthanhtrungg Try to delete node_modules, yarn.lock and re-install. In the latest commit, I've rename the version from "0.0.1-beta1" => "0.0.1.beta.0" (0.0.1.beta1 is wrong version name ruler).

Also, we're using parcel for bundler, and it's require node version ">= 12.0.0". Let's check your node version too.

@ladifire I forked latest commit and run yarn, node 12.4.0 >= 12.0.0 check the logs above

@phamthanhtrungg sorry, your error logs say:

error @parcel/source-map@2.0.0-alpha.4.19: The engine "node" is incompatible with this module. Expected version "^10 || ^12.18.3 || >=14". Got "12.4.0"

Install node ^12.18.3 will fix this issue!

@phamthanhtrungg You can use nvm and install 12.18.3, then switch between versions.

@ladifire I know but it �does not cause error with npm only with yarn

@phamthanhtrungg sorry, please delete these lines in package.json of "packages/stylex-reactjs-examples":

  "dependencies": {
    "@ladifire-opensource/babel-plugin-transform-stylex": "0.0.1-beta1",
    "@ladifire-opensource/stylex": "0.0.1-beta1",
    "@ladifire-opensource/stylex-webpack-plugin": "0.0.1-beta1",

Also, delete yarn.lock, node_modules and try re-install.

Thanks you!