You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get this to import into an example react app from following the advice in the template's README.
Maybe it is out of date?
Can someone check my methods below or provide alternative guidance?
Steps to reproduce:
npx create-react-app react-vocab-suggester-test-app --template typescript
cd react-vocab-suggester-test-app/
npm install git+ssh://[email protected]/7yl4r/react_component
sed -i '1iimport { Button } from "@7yl4r/vocab_suggester";\n' src/App.tsx
npm run start
This will yield the following error:
Compiled with problems:
ERROR in src/App.tsx:1:24
TS2307: Cannot find module '@7yl4r/vocab_suggester' or its corresponding type declarations.
> 1 | import { Button } from "@7yl4r/vocab_suggester";
| ^^^^^^^^^^^^^^^^^^^^^^^^
2 |
3 | import React from 'react';
4 | import logo from './logo.svg';
I can confirm that @7yl4r/vocab_suggester has been added to the package.json.
I tried clearing the cache as suggested by ChatGPT and did this twice to be sure.
The text was updated successfully, but these errors were encountered:
Just chiming in to say I can reproduce this. As a React novice I'm not sure the best way to debug, but I know that create-react-app is deprecated, so I wonder if that's a contributing factor.
I can't get this to import into an example react app from following the advice in the template's README.
Maybe it is out of date?
Can someone check my methods below or provide alternative guidance?
Steps to reproduce:
This will yield the following error:
I can confirm that @7yl4r/vocab_suggester has been added to the
package.json
.I tried clearing the cache as suggested by ChatGPT and did this twice to be sure.
The text was updated successfully, but these errors were encountered: