Closed Zignature closed 2 years ago
Make sure the dependencies are up-to-date by running npm ci
.
I've got multiple automated test runs proving it works 😉
Ofcourse... 😏 (slaps himself in the face)
This is also the error that we are getting in our library https://github.com/balena-io-modules/rendition after an rm -r node_modules && npm i && npx tsc
using TS 3.9.
$ npx tsc
node_modules/easymde/types/easymde.d.ts:24:10 - error TS2616: 'marked' can only be imported by using 'import marked = require("../../@types/marked")' or a default import.
24 import { marked } from 'marked';
~~~~~~
Found 1 error.
PS: We don't have lockfiles, so it should bring in the latest of all packages.
rendition@25.4.10
└─┬ react-simplemde-editor@4.1.5
├── @types/marked@0.7.4
└─┬ easymde@2.16.1
└── @types/marked@4.0.1
I think @types/marked@0.7.4
is causing the issue here. Marked changed its exports in version 4.0.0 and the types need to match it. (https://github.com/markedjs/marked/releases/tag/v4.0.0)
If upgrading is not possible, you could add "skipLibCheck": true
to your tsconfig.json
, that'll silence the error.
Describe the bug Getting an error eecuting
npm run test
.marked
cannot be imported.To Reproduce Steps to reproduce the behavior:
npm run test
in the main/root directoryExpected behavior No errors
Screenshots
Version information