Issue creating new project

Hi,

I’m just trying out Redwood. Following the quickstart, I try

> yarn create redwood-app tmp
yarn create v1.22.10
warning package.json: No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-redwood-app@0.25.1" with binaries:
      - create-redwood-app
[############################################################################################################] 333/333
  ✔ Creating Redwood app
    ✔ Creating directory '[dir]/redwood/tmp'
  ✔ Installing packages
    ✔ Checking node and yarn compatibility
    ✔ Running `yarn install`... (This could take a while)

Thanks for trying out Redwood!

We've created your app in '[dir]/redwood/tmp'
Enter the directory and run 'yarn rw dev' to start the development server.

then I type:

> cd tmp
> yarn rw dev
yarn run v1.22.10
$ [dir]/redwood/tmp/node_modules/.bin/rw dev
  ✔ Generating the Prisma client...
$ [dir]/redwood/tmp/node_modules/.bin/webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js
$ [dir]/redwood/tmp/node_modules/.bin/dev-server
api | Running at 'http://localhost:8911'
api | Watching files in '[dir]/redwood/tmp/api/src/functions'
web | ℹ 「wds」: Project is running at http://localhost:8910/
web | ℹ 「wds」: webpack output is served from /
web | ℹ 「wds」: Content not from webpack is served from [dir]/redwood/tmp/web
web | ℹ 「wds」: 404s will fallback to /index.html
api | Done. Took 2881ms.

and it opens localhost:8910 in my browser. That then shows:

TypeError: _interopRequireDefault is not a function

../node_modules/@redwoodjs/web/dist/components/FatalErrorBoundary.js

node_modules/@redwoodjs/web/dist/components/FatalErrorBoundary.js:13

```
  10 |   11 | exports.default = void 0;  12 | > 13 | var _react = _interopRequireDefault(require("react"));  14 |   15 | class InfallibleErrorBoundary extends _react.default.Component {  16 |   constructor(...args) {
```

View compiled

__webpack_require__

[dir]/redwood/tmp/web/webpack/bootstrap:853

```
  850 | };  851 |   852 | // Execute the module function> 853 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  854 |   855 | // Flag the module as loaded  856 | module.l = true;
```

View compiled

fn

[dir]/redwood/tmp/web/webpack/bootstrap:150

```
  147 | 		);  148 | 		hotCurrentParents = [];  149 | 	}> 150 | 	return __webpack_require__(request);      | ^  151 | };  152 | var ObjectFactory = function ObjectFactory(name) {  153 | 	return {
```

View compiled

../node_modules/@redwoodjs/web/dist/index.js

node_modules/@redwoodjs/web/dist/index.js:85

__webpack_require__

[dir]/redwood/tmp/web/webpack/bootstrap:853

```
  850 | };  851 |   852 | // Execute the module function> 853 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  854 |   855 | // Flag the module as loaded  856 | module.l = true;
```

View compiled

fn

[dir]/redwood/tmp/web/webpack/bootstrap:150

```
  147 | 		);  148 | 		hotCurrentParents = [];  149 | 	}> 150 | 	return __webpack_require__(request);      | ^  151 | };  152 | var ObjectFactory = function ObjectFactory(name) {  153 | 	return {
```

View compiled

Module../src/index.js

http://localhost:8910/static/js/app.chunk.js:88302:72

__webpack_require__

[dir]/redwood/tmp/web/webpack/bootstrap:853

```
  850 | };  851 |   852 | // Execute the module function> 853 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  854 |   855 | // Flag the module as loaded  856 | module.l = true;
```

View compiled

fn

[dir]/redwood/tmp/web/webpack/bootstrap:150

```
  147 | 		);  148 | 		hotCurrentParents = [];  149 | 	}> 150 | 	return __webpack_require__(request);      | ^  151 | };  152 | var ObjectFactory = function ObjectFactory(name) {  153 | 	return {
```

View compiled

1

http://localhost:8910/static/js/app.chunk.js:88362:18

__webpack_require__

[dir]/redwood/tmp/web/webpack/bootstrap:853

```
  850 | };  851 |   852 | // Execute the module function> 853 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));      | ^  854 |   855 | // Flag the module as loaded  856 | module.l = true;
```

View compiled

checkDeferredModules

[dir]/redwood/tmp/web/webpack/bootstrap:45

```
  42 | 	}  43 | 	if(fulfilled) {  44 | 		deferredModules.splice(i--, 1);> 45 | 		result = __webpack_require__(__webpack_require__.s = deferredModule[0]);     | ^  46 | 	}  47 | }  48 | 
```

View compiled

Array.webpackJsonpCallback [as push]

[dir]/redwood/tmp/web/webpack/bootstrap:32

```
  29 | 	deferredModules.push.apply(deferredModules, executeModules || []);  30 |   31 | 	// run deferred modules when all chunks ready> 32 | 	return checkDeferredModules();     | ^  33 | };  34 | function checkDeferredModules() {  35 | 	var result;
```

View compiled

(anonymous function)

http://localhost:8910/static/js/app.chunk.js:1:57

versions:

> node --version
v15.9.0
> yarn --version
1.22.10

Thanks for any help–I’m excited to try it out.

Welcome to the forums @DavisLaffer! Sorry for the lousy first impression of Redwood :frowning:

What OS are you on? Can you please provide the full output from yarn rw info?

Thanks @Tobbe – I’m sure it’s my fault. This machine has been around the development block so might have something weird installed somewhere. (Though it’s mostly littered with Python packages.)

I’m on MacOS Big Sur 11.0.1 (build 20B50). Node, etc are via homebrew and I ran brew update; brew upgrade.

> uname -a
Darwin Davis-MBP.localdomain 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64

> yarn rw info
yarn run v1.22.10
$ [dir]/redwood/tmp/node_modules/.bin/rw info

  System:
    OS: macOS 11.0.1
    Shell: 3.1.2 - /usr/local/bin/fish
  Binaries:
    Node: 15.9.0 - /var/folders/m5/45sybd1j19qc_3k4gw6qsmgm0000gn/T/yarn--1614039841096-0.8807160141053807/node
    Yarn: 1.22.10 - /var/folders/m5/45sybd1j19qc_3k4gw6qsmgm0000gn/T/yarn--1614039841096-0.8807160141053807/yarn
  Databases:
    SQLite: 3.32.3 - /usr/bin/sqlite3
  Browsers:
    Chrome: 88.0.4324.192
    Firefox: 57.0.2
    Safari: 14.0.1
  npmPackages:
    @redwoodjs/core: ^0.25.1 => 0.25.1

✨  Done in 3.57s.

I looked in my FatalErrorBoundary.js file, and this is what i have

Does yours look the same?

Do you have the babel file?

As far as I can tell FatalErrorBoundary.js is char-for-char identical on my machine (there are more lines that follow line 13). There also exists FatalErrorBoundary.d.ts and .d.ts.map

I don’t have a interopRequireDefault.js; instead it’s a directory with two files:

> more node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault/index.js
function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

module.exports = _interopRequireDefault;
module.exports["default"] = module.exports;
module.exports.__esModule = true;

> more node_modules/@babel/runtime-corejs3/helpers/interopRequireDefault/index.mjs
export default function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

I tried an older version and it worked (yarn global add create-redwood-app@0.25.0, etc). Not being a Javascript developer, I figured I’d at least git bisect it and find what commit caused the issue. But I got back to HEAD and it works!

So, now Redwood runs just fine on my machine and I have no idea what changed.

It looks like some stuff changed under-the-hood between yesterday and today in terms of underlying libs:

> diff -r tmp2 tmp | grep -v tmp | wc -l
5696

Please lmk if there’s anything more specific/useful I can diff between the two to see if there’s anything that should be version-locked (sorry, I’m a Python programmer so this is a first foray into JS so I don’t really know where to look).

> diff tmp/yarn.lock tmp2/yarn.lock
122,125c122,125
< "@babel/compat-data@^7.11.0", "@babel/compat-data@^7.13.0":
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.0.tgz#7889eb7ee6518e2afa5d312b15fd7fd1fe9f3744"
<   integrity sha512-mKgFbYQ+23pjwNGBNPNWrBfa3g/EcmrPnwQpjWoNxq9xYf+M8wcLhMlz/wkWimLjzNzGnl3D+C2186gMzk0VuA==
---
> "@babel/compat-data@^7.13.0", "@babel/compat-data@^7.13.5":
>   version "7.13.5"
>   resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.5.tgz#1e3b9043df6e3f5cfa750854adeb0c7a222d15a8"
>   integrity sha512-+c3G3S8n5ziRyfLybmgm9Y6KgoCni+s0hkV0I5bIpGWhu8uqEQo/VGnETY8YS6PFwedAoXOqfe4FhrvbtsLu+Q==
128,130c128,130
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.0.tgz#5d61713de310dcfb09258b9fbd081c90623a9548"
<   integrity sha512-aiv4TeB1i0y3E/+be4U4xtb21CvidNbBegcxvVOrM2B5HfKwwCbYdhGbZUtzeV4HkNevRMLx7oSgQ9bjl4WhXw==
---
>   version "7.13.1"
>   resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.1.tgz#7ddd027176debe40f13bb88bac0c21218c5b1ecf"
>   integrity sha512-FzeKfFBG2rmFtGiiMdXZPFt/5R5DXubVi82uYhjGX4Msf+pgYQMCFIqFXZWs5vbIYbf14VeBIgdGI03CDOOM1w==
173c173
< "@babel/helper-compilation-targets@^7.10.4", "@babel/helper-compilation-targets@^7.13.0":
---
> "@babel/helper-compilation-targets@^7.13.0":
202,205c202,205
< "@babel/helper-define-polyfill-provider@^0.1.0":
<   version "0.1.0"
<   resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.0.tgz#a9e8a161bb594a6a26ba93f68efd475c935a1727"
<   integrity sha512-/nX4CQRve5OZsc0FsvkuefeIQFG7GQo2X5GbD/seME7Tu4s2gHuQfXTIKup++/W9K1SWi2dTe7H9zhgJxhn/pA==
---
> "@babel/helper-define-polyfill-provider@^0.1.2":
>   version "0.1.2"
>   resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.2.tgz#619f01afe1deda460676c25c463b42eaefdb71a2"
>   integrity sha512-hWeolZJivTNGHXHzJjQz/NwDaG4mGXf22ZroOP8bQYgvHNzaQ5tylsVbAcAS2oDjXBwpu8qH2I/654QFS2rDpw==
207,210c207,210
<     "@babel/helper-compilation-targets" "^7.10.4"
<     "@babel/helper-module-imports" "^7.10.4"
<     "@babel/helper-plugin-utils" "^7.10.4"
<     "@babel/traverse" "^7.11.5"
---
>     "@babel/helper-compilation-targets" "^7.13.0"
>     "@babel/helper-module-imports" "^7.12.13"
>     "@babel/helper-plugin-utils" "^7.13.0"
>     "@babel/traverse" "^7.13.0"
254c254
< "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.13":
---
> "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.12.13":
385,392c385,392
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.0.tgz#49b9b6ee213e5634fa80361dae139effef893f78"
<   integrity sha512-w80kxEMFhE3wjMOQkfdTvv0CSdRSJZptIlLhU4eU/coNJeWjduspUFz+IRnBbAq6m5XYBFMoT1TNkk9K9yf10g==
< 
< "@babel/plugin-proposal-async-generator-functions@^7.13.0":
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.0.tgz#42f4a4922c973ceb70bfd4708daf55601fe25434"
<   integrity sha512-3Loqr0+jE2/yqp29VnW1YqcWjGnIQwICotlrMfn6+1Ih2MBIbaaIFpJ5fnmYmGSUa9vwMhHOh2rMAqUH7NMWmQ==
---
>   version "7.13.4"
>   resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab"
>   integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA==
> 
> "@babel/plugin-proposal-async-generator-functions@^7.13.5":
>   version "7.13.5"
>   resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.5.tgz#69e3fbb9958949b09036e27b26eba1aafa1ba3db"
>   integrity sha512-8cErJEDzhZgNKzYyjCKsHuyPqtWxG8gc9h4OFSUDJu0vCAOsObPU2LcECnW0kJwh/b+uUz46lObVzIXw0fzAbA==
861,863c861,863
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.0.tgz#f03b09b65b7a336409d98ff4cf1324122e8698ac"
<   integrity sha512-RbZI+W2EjQ7P5+05KaO1rm8cU6DxfSP3XfKM8DjX9U6cLwfGWtRBi84Un9XOd1kGfKhhmedPVE5klXZ5FgwfeA==
---
>   version "7.13.5"
>   resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.5.tgz#0fbe13d8980f136b77554a7d6893fa7db91dc587"
>   integrity sha512-prZzwuR0C4pCHAkWzBAPSqm7A1kOyE+Fd7IaNqZPfEtWvt6xWmOtgbfmQ1lAZqbvU+4e9DSvf7ldkjClmNbZSQ==
867,869c867,869
<     babel-plugin-polyfill-corejs2 "^0.1.2"
<     babel-plugin-polyfill-corejs3 "^0.1.2"
<     babel-plugin-polyfill-regenerator "^0.1.1"
---
>     babel-plugin-polyfill-corejs2 "^0.1.4"
>     babel-plugin-polyfill-corejs3 "^0.1.3"
>     babel-plugin-polyfill-regenerator "^0.1.2"
933,935c933,935
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.13.0.tgz#6ecc3daf63627792ec03d1076dbb54b4928a9e0d"
<   integrity sha512-UeU4bHlskjdwqNnaiBEYTXbL7dtuUDtOOkcS2c64wR2UqwUMzlRsvxoKQtsVJR579dS3Wmxnb7HRc9U5mSzQhA==
---
>   version "7.13.5"
>   resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.13.5.tgz#68b3bbc821a97fcdbf4bd0f6895b83d07f84f33e"
>   integrity sha512-xUeKBIIcbwxGevyWMSWZOW98W1lp7toITvVsMxSddCEQy932yYiF4fCB+CG3E/MXzFX3KbefgvCqEQ7TDoE6UQ==
937c937
<     "@babel/compat-data" "^7.13.0"
---
>     "@babel/compat-data" "^7.13.5"
941c941
<     "@babel/plugin-proposal-async-generator-functions" "^7.13.0"
---
>     "@babel/plugin-proposal-async-generator-functions" "^7.13.5"
1000,1002c1000,1002
<     babel-plugin-polyfill-corejs2 "^0.1.2"
<     babel-plugin-polyfill-corejs3 "^0.1.2"
<     babel-plugin-polyfill-regenerator "^0.1.1"
---
>     babel-plugin-polyfill-corejs2 "^0.1.4"
>     babel-plugin-polyfill-corejs3 "^0.1.3"
>     babel-plugin-polyfill-regenerator "^0.1.2"
1057,1059c1057,1059
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.13.0.tgz#6ea08985376459150ad1523c9924b57ce099c443"
<   integrity sha512-kgM3RIt84opUeghxTK+9FclJZI6xreu7aZ4G/l86IO90z5BL9NSPhweSgLDc6zF0tgSiSyMOhWekx+uwpQXGbA==
---
>   version "7.13.4"
>   resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.13.4.tgz#9f3f3ad6bd4cb5ec16a1e1c73c9f74abdaeee897"
>   integrity sha512-W8GBjqrF1/zMrdus/epxngkjn5TGePhgAu1EJq8llEC2NmPsVipm6Emd39z/iPzyqwG2QUJXpy6qajHC5m6PGA==
1065,1067c1065,1067
<   version "7.13.0"
<   resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.0.tgz#7f2cd0e2086626eea186a5a062e21e77ec0e45d0"
<   integrity sha512-himjPiVq1N4Eqv80uaIMdLYav1LWO51J7PwQkgp3z8N0v8cnaeP5kSgWH4hS6jvjjWAbh5tB5fVw+zuNyyQTYQ==
---
>   version "7.13.4"
>   resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.4.tgz#a2f5b5304d6f98a94053e6737321501347325617"
>   integrity sha512-pZLFG10nRL1hPF9J0/WdxjVuLEanSge8W3Ct+Kls9fNhD4vOi9bhuAU8DdNARvBE9GTg6UhQFcEIF1XhIZd9ZA==
1095c1095
< "@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.11.5", "@babel/traverse@^7.13.0", "@babel/traverse@^7.7.0":
---
> "@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.13.0", "@babel/traverse@^7.7.0":
1553a1554,1561
> "@hypnosphi/create-react-context@^0.3.1":
>   version "0.3.1"
>   resolved "https://registry.yarnpkg.com/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz#f8bfebdc7665f5d426cba3753e0e9c7d3154d7c6"
>   integrity sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==
>   dependencies:
>     gud "^1.0.0"
>     warning "^4.0.3"
> 
4433,4436c4441,4444
< babel-plugin-polyfill-corejs2@^0.1.2:
<   version "0.1.2"
<   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.2.tgz#3e5e7ef339dd84ca34c6a20605e6d4ef62aba3b1"
<   integrity sha512-sSGAKN95gTnXjg3RtGI9QBW/xSqXy5fo2Bt+W5WkhconIO+QxuDZChyjZYiY90xE3MQRI1k73Dh/HAe86cWf8A==
---
> babel-plugin-polyfill-corejs2@^0.1.4:
>   version "0.1.5"
>   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.5.tgz#8fc4779965311393594a1b9ad3adefab3860c8fe"
>   integrity sha512-5IzdFIjYWqlOFVr/hMYUpc+5fbfuvJTAISwIY58jhH++ZtawtNlcJnxAixlk8ahVwHCz1ipW/kpXYliEBp66wg==
4438,4439c4446,4447
<     "@babel/compat-data" "^7.11.0"
<     "@babel/helper-define-polyfill-provider" "^0.1.0"
---
>     "@babel/compat-data" "^7.13.0"
>     "@babel/helper-define-polyfill-provider" "^0.1.2"
4442,4445c4450,4453
< babel-plugin-polyfill-corejs3@^0.1.2:
<   version "0.1.2"
<   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.2.tgz#39b0d46744360738237bd54052af852c84d74ebf"
<   integrity sha512-7neRvPKcdvZ4X9IpYBCmT+ceVUKC1idX7DJN5sRtiPP9d0ABD6k5x/QvXTiz/9wMp86FBDX6Gz0g7WQY2lRfgw==
---
> babel-plugin-polyfill-corejs3@^0.1.3:
>   version "0.1.4"
>   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.4.tgz#2ae290200e953bade30907b7a3bebcb696e6c59d"
>   integrity sha512-ysSzFn/qM8bvcDAn4mC7pKk85Y5dVaoa9h4u0mHxOEpDzabsseONhUpR7kHxpUinfj1bjU7mUZqD23rMZBoeSg==
4447c4455
<     "@babel/helper-define-polyfill-provider" "^0.1.0"
---
>     "@babel/helper-define-polyfill-provider" "^0.1.2"
4450,4453c4458,4461
< babel-plugin-polyfill-regenerator@^0.1.1:
<   version "0.1.1"
<   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.1.tgz#3b9b907d1554747ff131bd5c6da81713e342db73"
<   integrity sha512-QZlnPDLX2JEXP8RQGeP4owNxRKUAqHD+rdlyRHV8ENeCcI9ni2qT9IzxT9jYW1aZrxCgehD31LztlMaA68zoqQ==
---
> babel-plugin-polyfill-regenerator@^0.1.2:
>   version "0.1.3"
>   resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.3.tgz#350f857225fc640ae1ec78d1536afcbb457db841"
>   integrity sha512-hRjTJQiOYt/wBKEc+8V8p9OJ9799blAJcuKzn1JXh3pApHoWl1Emxh2BHc6MC7Qt6bbr3uDpNxaYQnATLIudEg==
4455c4463
<     "@babel/helper-define-polyfill-provider" "^0.1.0"
---
>     "@babel/helper-define-polyfill-provider" "^0.1.2"
5811c5819
< create-react-context@0.3.0, create-react-context@^0.3.0:
---
> create-react-context@0.3.0:
11124,11126c11132,11134
<   version "1.1.2"
<   resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731"
<   integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==
---
>   version "1.1.3"
>   resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee"
>   integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==
11128c11136
<     call-bind "^1.0.0"
---
>     call-bind "^1.0.2"
11130c11138
<     es-abstract "^1.18.0-next.1"
---
>     es-abstract "^1.18.0-next.2"
12216,12218c12224,12226
<   version "6.15.3"
<   resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-6.15.3.tgz#ab4ccad9cde42a121fdfb828d9aff0d3d008441f"
<   integrity sha512-593jDlfP66NlMUOW5aNlCTzFWcFAOIyeFIGQtDreVLZ6n2o5D0DBIv/F+6mGZY0kCZs7yArs/YcgZBFLm1IXbg==
---
>   version "6.15.4"
>   resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-6.15.4.tgz#328003e1ccc096cd158899ffe7e3b33735a9b024"
>   integrity sha512-K+Sw33DtTMengs8OdqFJI3glzNl1wBzSefD/ksQw/hJf9CnOHQAU6qy82eOrh0IRNt2G53sjr7qnnw1JDjvx1w==
12251,12253c12259,12261
<   version "1.3.9"
<   resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.9.tgz#2e7bf037b7857279a18bb4474c0852358689296f"
<   integrity sha512-xKQMQmUMOHAtURz2hj1a0f+M2hyMVWC20hJ09l8UNO2aSCK48kWfdwAuwdCauER0Vo8gV4Qr9G0GobP6KG9AIQ==
---
>   version "1.3.10"
>   resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.10.tgz#96fd88cc1bf45957e551c5053afea7adc0b1d4d8"
>   integrity sha512-sZfwHtHCMst0L0G/c83/Y/K1f9fNWMEKsk/cGAor68rQBHB75WuDQ7k95tkce8QNaUHhg9uFXIJbZO0eWRvJbw==
12256c12264
<     create-react-context "^0.3.0"
---
>     "@hypnosphi/create-react-context" "^0.3.1"

(I think these are both redwood@0.25.1 though I could have it wrong)

I had the same issue today, here’s what fixed it:

  1. rm -rf yarn.lock node_modules
  2. yarn install

Something about a dependency was awry, but resetting the lockfile fixed it.

@brentjanderson , you wrote “I had the same issue today” - I am right assuming that “the same” means the same as @DavisLaffer stated above? If that is the case, there is something off in your case - as when creating a new redwood app (yarn create redwood-app tmp) there is no yarn.lock and no node_modules folder so no versions mismatch can occur.

This same problem (running into an inconsistent state) exists since the earliest days of JavaScript application development and it was a lot more “deadly”, so I retained the habit to delete the files created by running yarn install command. Redwood does not do that automatically because the command rm -rf node_modules takes a lot of time. The very simple Redwood app, explained in the tutorial, consists of 68,294 Files, 9,973 Folders (on Windows) using 618 MBytes on disk.

I certainly get both a node_modules folder and a yarn.lock file when I create a new redwood app. And if something is messed up with the dependencies it could totally be fixed by deleting them both and installing again with yarn install

Unfortunately yarn isn’t as deterministic as we all would like

1 Like

@Tobbe let’s be precise: at the time one issues the yarn install command, there should be no yarn.lock nor node_modules folder. Consequently, removing these files / folders is impossible and they cannot be the cause of the crash described above

My suspicion (without spending more time on this because removing the lockfile and packages folder fixed this issue for me) is that some dependency (probably related to babel, given the error) had a bug in a recent release that was captured in the lockfile when the project was created (for me, that was yesterday). When installing after removing the lockfile and packages folder, yarn picked a newer release that fixed whatever that bug might have been.

An alternative to removing those files would be to try yarn upgrade-interactive and experiment with upgrading various packages (starting with babel or maybe webpack) and going from there.

yarn create redwood-app will automatically yarn install all the dependencies, so you will have a yarn.lock and node_modules after running the initial command to generate a project.

The only time you’ll need to yarn install from scratch is if you clone a repo, that’s when you’ll find yourself with a project that doesn’t include those already.

1 Like

@ajcwebdev yes, you are correct - I forgot that yarn create redwood-app runs yarn install “behind the scenes”. Nevertheless, the point I tried to make is when someone runs yarn create redwood-app there should not be node_modules nor yarn.lock present. This in turn means that the information in yarn.lock and node_modules could be the cause of yarn create redwood-app crash.

To elaborate a bit more: it often happens that folks would run yarn create redwood-app more than once in the same project (folder). I would recommend to manually delete yarn.lock and node_modules manually, before running yarn create redwood-app again. this would prevent the crash described above

I am recommending this simply because I am not sure how yarn handles the situation where it needs to create yarn.lock and node_modules “over” the existing ones.

Hmm okay, I think there’s some confusion here because I wouldn’t run yarn create redwood-app more than once in a project folder, if I had already used that command to generate a project and I needed a fresh re-install for some reason then I would delete yarn.lock and node_modules and then just run yarn install, I wouldn’t run yarn create redwood-app again.

Hello @ajcwebdev - we are now (a bit late) in the full agreement. The original problem, posted by @DavisLaffer can be understood that he run yarn create redwood-app twice, without following your (and my) advice

delete yarn.lock and node_modules and then just run yarn install

Note: I have more than 10 years of experience in managing “remote developers” and still failed to explain the cause of the original problem, without trapping you on the way. It just confirms how much of the face-to-face conversation is lost in written communications like this one.

Gotcha, that makes perfect sense :smile:

First, thank you all for the deep dive! This looks like a great community for such an early-stage project.

I’m pretty sure I only ran yarn create redwood-app tmp once (well, I tried it more than once but did rm -rf tmp between runs). It looks like some dependency resolved itself. Per the above, @brentjanderson may have been running some things multiple times.

After work I’m going to start playing with rw this evening!

Yes you only ran it once. yarn create will refuse to run if the dir isn’t empty :slight_smile:

Now is the right moment to ask why can we teach yarn to remove the file and folders which we have to remove manually :imp:

This is the consequence of the fact that the founders are the very experienced leader of open-source projects creation and management. Projects of importance and complexity of RedwoodJS cannot succeed without a lot of “fanatic” contributors.