Yarn 2 setup not working: Tina Getting Started App

hi,

steps to reproduce the issue:

  • $ yarn set version berry
  • $ git clone https://github.com/tinacms/tina-intro-tutorial.git my-tina-app
  • $ yarn add tinacms styled-components
  • from Tina Getting started
diff --git a/src/App.js b/src/App.js
index 8d304bb..9c0ff6a 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,12 +1,18 @@
import React from 'react';
import logo from './Icon.svg';
import './App.css';
+import { TinaProvider, TinaCMS } from 'tinacms';

function App() {
+  const cms = new TinaCMS({
+    sidebar: true,
+  });
  return (
-    <div className="App">
-      <PageContent />
-    </div>
+    <TinaProvider cms={cms}>
+      <div className="App">
+        <PageContent />
+      </div>
+    </TinaProvider>
  );
}

  • $ yarn start

output:

Failed to compile.

./.yarn/$$virtual/@tinacms-fields-virtual-76140ecf9d/0/cache/@tinacms-fields-npm-0.40.0-bea08e5dc2-b3b98e3f8a.zip/node_modules/@tinacms/fields/build/index.js
Module not found: @tinacms/fields tried to access @tinacms/form-builder, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

is there a way to run tinacms along with yarn 2?

We use Yarn 2 on our graphql-gateway package, so I would hope it works, but can’t really say.

We didn’t experience much with Yarn 2 outside of this package for now, can’t you switch to Yarn 1 or npm for this project?

I had problems in order to go back to yarn 1 so I ended up using classic npm and go on.

Thanks.

1 Like