-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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://git@github.com/7yl4r/react_component
sed -i '1iimport { Button } from "@7yl4r/vocab_suggester";\n' src/App.tsx
npm run startThis 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.
Metadata
Metadata
Assignees
Labels
No labels