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
import{helloWorld,goodBye}from'../src';importcommonPackagefrom'../src';// instead of import{helloWorld,goodBye}from'../index';importnpmPackagefrom'../index';
Steps To Reproduce
Follow the installation guidelines from the README.md
Run npm test
Will results into the following error tests/index.spec.ts:5:27 - error TS2307: Cannot find module '../index' or its corresponding type declarations.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
You probably have figure it out already, it should be:
import { helloWorld, goodBye } from '../src/index';
import npmPackage from '../src/index';
// instead of
import { helloWorld, goodBye } from '../index';
import npmPackage from '../index';
Is there an existing issue for this?
Description of the bug
First of all, thank you very much for that repo, it's very useful.
I noticed that some of the imports located in the
index.spec.ts
are wrong.See https://github.com/snyk-labs/modern-npm-package/blob/main/tests/index.spec.ts#L5
Indeed, I guess it should be
Steps To Reproduce
npm test
tests/index.spec.ts:5:27 - error TS2307: Cannot find module '../index' or its corresponding type declarations.
Additional Information
No response
The text was updated successfully, but these errors were encountered: