How to install Gulp.js v4 globally with Yarn? - node.js

I installed Gulp.js globally with Yarn:
$ yarn global add gulp --no-bin-links
yarn global v1.17.3
[1/4] Resolving packages...
warning gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
warning gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
[2/4] Fetching packages...
info fsevents#1.2.12: The platform "linux" is incompatible with this module.
info "fsevents#1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "gulp#4.0.2" with binaries:
- gulp
Done in 5.76s.
$ yarn global add gulp-cli --no-bin-links
yarn global v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.12: The platform "linux" is incompatible with this module.
info "fsevents#1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "gulp-cli#2.2.0" with binaries:
- gulp
Done in 1.60s.
(I'm using the --no-bin-links parameter to avoid this error: error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../semver/bin/semver' -> '/path/to/project/public/components/accord/node_modules/.bin/semver'".)
The yarn global list provides the expected output:
$ yarn global list
yarn global v1.17.3
info "gulp#4.0.2" has binaries:
- gulp
info "gulp-cli#2.2.0" has binaries:
- gulp
Done in 0.53s.
But when I now execute gulp, old versions (Gulp 3.9.1 and Gulp CLI 2.2.0 are used:
$ gulp -v
CLI version: 2.2.0
Local version: 3.9.1
What is wrong here and how to install the required Gulp version globally correctly with Yarn and make this version be used?

Related

Create-react-app error : internal/modules/cjs/loader.js:311 , when using npx to create a react app

When using npx create-react-app to create a new react project, the process stops with error : internal/modules/cjs/loader.js:311.
internal/modules/cjs/loader.js:311
throw err;
^
Error: Cannot find module 'C:\Users\shonm\Desktop\Web Development\WebSites\test1\node_modules\fs-extra\lib\index.js'. Please verify that the package.json has a valid "main"
entry
PS C:\Users\shonm\Desktop\Web Development\WebSites> npx create-react-app test1
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#1.2.13: The platform "win32" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.2: The platform "win32" is incompatible with this module.
info "fsevents#2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
.......
Done in 30.17s.
**internal/modules/cjs/loader.js:311
throw err;
^
Error: Cannot find module 'C:\Users\shonm\Desktop\Web Development\WebSites\test1\node_modules\fs-extra\lib\index.js'. Please verify that the package.json has a valid "main"
entry**
at tryPackage (internal/modules/cjs/loader.js:303:19)
requestPath: 'fs-extra'
}
Aborting installation.
node has failed.
Deleting generated file... node_modules
This happens when there is both npm and yarn installed globally. The create-react-app was using yarn to build. To fix this, use npx create-react-app projectname --use-npm, or remove yarn from global package.
Also verify, if the node installation is proper with node -v && npm -v

yarn add react-native whern creating a project via npx

So I have npm 7.5.3 and node v15.8.0 on my ubuntu system. I'm trying to create a react-native project as follows:
npx react-native init Sample
And I get a large error dump with the following description towards the end
Installing react-native...
yarn add v1.16.0
warning ../../../package.json: No license field
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs > 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.
warning react-native > fbjs-scripts > 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.
warning react-native > #react-native-community/cli > #hapi/joi#15.1.1: Switch to 'npm install joi'
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > #hapi/joi > #hapi/topo > #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
warning react-native > #react-native-community/cli > metro > jest-haste-map > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning react-native > #react-native-community/cli > metro > jest-haste-map > micromatch > snapdragon > source-map-resolve > resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
warning react-native > #react-native-community/cli > metro > jest-haste-map > micromatch > snapdragon > source-map-resolve > urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] Fetching packages...
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
error react-native#0.63.4: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.16.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (node:child_process:681:11)
at execSync (node:child_process:718:15)
at run (/usr/lib/node_modules/react-native-cli/index.js:294:5)
at createProject (/usr/lib/node_modules/react-native-cli/index.js:249:3)
at init (/usr/lib/node_modules/react-native-cli/index.js:200:5)
at Object.<anonymous> (/usr/lib/node_modules/react-native-cli/index.js:153:7)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 24544,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.
npm ERR! code 1
npm ERR! path /home/anton/Documents/front-end
npm ERR! command failed
npm ERR! command sh -c react-native "init" "sample"
npm ERR! A complete log of this run can be found in:
npm ERR! /home/anton/.npm/_logs/2021-02-09T18_06_36_328Z-debug.log
How do I overcome this problem?
edit: I already attempted npm install --save core-js#^3 the error remains the same.

Aborting installation. yarnpkg add --exact react react-dom react-scripts cra-template --cwd /home/ficho/workspace/storybook-tutorial has failed

I am not able to create a new react app.
So far it worked great, but today I had to install yarn and since I would get this error, when I tried to create a new react app:
➜ workspace npx create-react-app storybook-tutorial
Creating a new React app in /home/ficho/workspace/storybook-tutorial.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.10
[1/4] Resolving packages...
warning react-scripts > babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
warning react-scripts > workbox-webpack-plugin > workbox-build > #hapi/joi#15.1.1: Switch to 'npm install joi'
warning react-scripts > workbox-webpack-plugin > workbox-build > rollup-plugin-babel#4.4.0: This package has been deprecated and is no
longer maintained. Please use #rollup/plugin-babel.
warning react-scripts > jest > #jest/core > jest-config > jest-environment-jsdom > jsdom > request-promise-native#1.0.9:
request-promise-native has been deprecated because it extends the now
deprecated request package, see
https://github.com/request/request/issues/3142
warning react-scripts > jest > #jest/core > jest-config > jest-environment-jsdom > jsdom > request#2.88.2: request has been
deprecated, see https://github.com/request/request/issues/3142
[2/4] Fetching packages...
info fsevents#1.2.12: The platform "linux" is incompatible with this module.
info "fsevents#1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#2.3.1: The platform "linux" is incompatible with this module.
info "fsevents#2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
error postcss#8.2.4: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.8.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd /home/ficho/workspace/storybook-tutorial has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting storybook-tutorial/ from /home/ficho/workspace
Done.
I use Ubuntu 18.4.
I tried clearing cache: yarn cache clear and updating npm npm install -g npm#latest
Upgrade your node.js would solve this problem.

“webpack binstubs not found.” on Heroku

I’ve spun up a new rails project with the following command: rails new -d postgresql --skip-spring --skip-test --webpack=react
Following this, I created my database, added <%= javascript_pack_tag 'hello_react' %> to application.html.erb and generated a homepage.
I then ran:
rails s # tab 1
bin/webpack-dev-server # tab 2
This all works fine and I can see “Hello World!” at localhost:3000.
However, when I try to push to Heroku, the build fails at webpack binstubs not found.. I can confirm that bin/webpack does exist, doing rails webpack:install:react does nothing.
I’ve followed the instructions at webpacker/deployment.md at master · rails/webpacker · GitHub to no avail, still getting the exact same error. I’ve even tried setting compile: true in config/webpacker.yml, in the production section. Nothing.
This seems odd as this is a new project with nothing special in it; I’m confused as to why it cannot seem to find the declaration of bin/webpack. It is not in my .gitignore.
Any help would be great.
Cheers.
Full build log:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
USE_YARN_CACHE=true
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): unspecified (use default)
Resolving node version 12.x...
Downloading and installing node 12.19.1...
Using default npm version: 6.14.8
Resolving yarn version 1.22.x...
Downloading and installing yarn (1.22.10)
Installed yarn 1.22.10
-----> Installing dependencies
Installing node modules (yarn.lock)
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > #babel/preset-react#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-display-name#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-development#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-self#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-source#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-pure-annotations#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx > #babel/plugin-syntax-jsx#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
[4/4] Building fresh packages...
Done in 29.74s.
-----> Build
-----> Pruning devDependencies
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > #babel/preset-react#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-display-name#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-development#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-self#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-source#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-pure-annotations#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx > #babel/plugin-syntax-jsx#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 5.82s.
-----> Caching build
- yarn cache
-----> Build succeeded!
! This app may not specify any way to start a node process
https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
! Unmet dependencies don't fail yarn install but may cause runtime issues
https://github.com/npm/npm/issues/7494
-----> Ruby app detected
-----> Installing bundler 2.1.4
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.7.2
-----> Installing dependencies using bundler 2.1.4
Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching rake 13.0.1
Installing rake 13.0.1
Fetching concurrent-ruby 1.1.7
Fetching thread_safe 0.3.6
Fetching minitest 5.14.2
Installing thread_safe 0.3.6
Installing minitest 5.14.2
Installing concurrent-ruby 1.1.7
Fetching zeitwerk 2.4.1
Installing zeitwerk 2.4.1
Fetching builder 3.2.4
Fetching erubi 1.10.0
Installing builder 3.2.4
Installing erubi 1.10.0
Fetching mini_portile2 2.4.0
Fetching crass 1.0.6
Installing mini_portile2 2.4.0
Installing crass 1.0.6
Fetching rack 2.2.3
Installing rack 2.2.3
Fetching nio4r 2.5.4
Installing nio4r 2.5.4 with native extensions
Fetching websocket-extensions 0.1.5
Installing websocket-extensions 0.1.5
Fetching mimemagic 0.3.5
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Installing mimemagic 0.3.5
Fetching msgpack 1.3.3
Installing msgpack 1.3.3 with native extensions
Using bundler 2.1.4
Fetching ffi 1.13.1
Installing ffi 1.13.1 with native extensions
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching pg 1.2.3
Installing pg 1.2.3 with native extensions
Fetching thor 1.0.1
Installing thor 1.0.1
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching turbolinks-source 5.2.0
Installing turbolinks-source 5.2.0
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching nokogiri 1.10.10
Installing nokogiri 1.10.10 with native extensions
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching rack-proxy 0.6.5
Installing rack-proxy 0.6.5
Fetching sprockets 4.0.2
Installing sprockets 4.0.2
Fetching websocket-driver 0.7.3
Installing websocket-driver 0.7.3 with native extensions
Fetching mail 2.7.1
Installing mail 2.7.1
Fetching marcel 0.3.3
Installing marcel 0.3.3
Fetching puma 4.3.6
Installing puma 4.3.6 with native extensions
Fetching bootsnap 1.5.1
Installing bootsnap 1.5.1 with native extensions
Fetching turbolinks 5.2.1
Installing turbolinks 5.2.1
Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions
Fetching activesupport 6.0.3.4
Installing activesupport 6.0.3.4
Fetching loofah 2.7.0
Installing loofah 2.7.0
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching globalid 0.4.2
Installing globalid 0.4.2
Fetching activemodel 6.0.3.4
Installing activemodel 6.0.3.4
Fetching jbuilder 2.10.1
Installing jbuilder 2.10.1
Fetching rails-html-sanitizer 1.3.0
Installing rails-html-sanitizer 1.3.0
Fetching activejob 6.0.3.4
Fetching activerecord 6.0.3.4
Installing activejob 6.0.3.4
Installing activerecord 6.0.3.4
Fetching actionview 6.0.3.4
Installing actionview 6.0.3.4
Fetching actionpack 6.0.3.4
Installing actionpack 6.0.3.4
Fetching actioncable 6.0.3.4
Installing actioncable 6.0.3.4
Fetching actionmailer 6.0.3.4
Installing actionmailer 6.0.3.4
Fetching railties 6.0.3.4
Fetching sprockets-rails 3.2.2
Installing sprockets-rails 3.2.2
Installing railties 6.0.3.4
Fetching activestorage 6.0.3.4
Installing activestorage 6.0.3.4
Fetching actionmailbox 6.0.3.4
Installing actionmailbox 6.0.3.4
Fetching actiontext 6.0.3.4
Installing actiontext 6.0.3.4
Fetching rails 6.0.3.4
Fetching webpacker 4.3.0
Installing rails 6.0.3.4
Installing webpacker 4.3.0
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Bundle complete! 12 Gemfile dependencies, 57 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Bundle completed (208.33s)
Cleaning up the bundler cache.
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents#2.1.3: The platform "linux" is incompatible with this module.
info "fsevents#2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents#1.2.13: The platform "linux" is incompatible with this module.
info "fsevents#1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > #babel/preset-react#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-display-name#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-development#7.12.7" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-self#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx-source#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-pure-annotations#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning "#babel/preset-react > #babel/plugin-transform-react-jsx > #babel/plugin-syntax-jsx#7.12.1" has unmet peer dependency "#babel/core#^7.0.0-0".
warning " > webpack-dev-server#3.11.0" has unmet peer dependency "webpack#^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware#3.7.2" has unmet peer dependency "webpack#^4.0.0".
[4/4] Building fresh packages...
Done in 29.50s.
I, [2020-11-25T12:02:13.452090 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js
I, [2020-11-25T12:02:13.452388 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz
I, [2020-11-25T12:02:13.452661 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
I, [2020-11-25T12:02:13.452831 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/application-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
I, [2020-11-25T12:02:13.453156 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/home-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css
I, [2020-11-25T12:02:13.453335 #3686] INFO -- : Writing /tmp/build_6728f1b1/public/assets/home-04024382391bb910584145d8113cf35ef376b55d125bb4516cebeb14ce788597.css.gz
webpack binstubs not found.
Have you run rails webpacker:install ?
Make sure the bin directory or binstubs are not included in .gitignore
Exiting!
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app.
! Push failed
SOLVED
Turns out bin/ is ignored by default in Rails.
Oddly enough, I still can't find the code which ignores bin/ for git; it doesn't look like it's in the main .gitignore
However, if you run
git add -f bin/webpack && git push heroku master # or main
everything should build.

create-react-app > error css-loader#1.0.0: The engine "node" is incompatible with this module. Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0"

I'm unable to npm init react-app my-app or npx create-react-app my-app even if I have node -v v8.2.1. My console output:
> [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... error
> css-loader#1.0.0: The engine "node" is incompatible with this module.
> Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0". error Found
> incompatible module info Visit https://yarnpkg.com/en/docs/cli/add for
> documentation about this command.
I tried to remove css-loader or install the last version of the package. Any help would be greatly appreciated.
You need node version above of 8.9.0 or between 6.9.0 to 7

Resources