kaimallea / isMobile

A simple JS library that detects mobile devices.
MIT License
2.36k stars 236 forks source link

File '@spotify/web-scripts/config/tsconfig.json' not found. #310

Open michalfialadev opened 1 year ago

michalfialadev commented 1 year ago

Hi there, I'm rather new to JS dev using npms, so the issue might be due to my inexperience, but when i yarn add ismobilejs, install goes through fine, the isMobile checks work perfectly, but i get a following (non breaking) error:

spotify-error

When i do a yarn in terminal, there seem to be no dependencies missing, since nothing gets installed, 0 problems. The node_modules folder doesn't have a @spotify package, do i need to install it to use isMobile (i hope not)? I tied just removing the extends line or the tsconfig.json file, but that didn't work either :/

Any ideas on how to get rid of the error?

kaimallea commented 1 year ago

Thanks for reporting; I'll take a look and see what's up. Usually, the error yo u're seeing can be resolved by running yarn install, to install dependencies (of which @spotify/web-scripts), but I bet you already tried that. Will circle back

gilmarsquinelato commented 6 months ago

Hello everyone!

I'm facing the same issue on some projects as well, and I guess that we can get it solved by simply specifying what files to include in the package 😄

This is happening because the entire repo is being added in the package while it shouldn't, for example: eslint config files, jest config, tsconfig.json, etc.

I think that a new release with this property added in package.json would solve the issue:

{
  "files": [
    "cjs",
    "dist",
    "esm",
    "types"
  ]
}

I hope this helps!