phamleduy04 / yahoo-stock-api

💰 NPM package to get stock and historical price from finance.yahoo.com
https://www.npmjs.com/package/yahoo-stock-api
MIT License
39 stars 14 forks source link

🐞 Version 2.2.0 is broken #143

Closed manusobles closed 1 year ago

manusobles commented 1 year ago

With version 2.2.0 I get this error. Version 2.1.3 works fine.

Error: Cannot find module '/Users/manu/Coding/Typescript/stocks_scripts/node_modules/yahoo-stock-api/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:415:19)
    at Function.Module._findPath (node:internal/modules/cjs/loader:665:18)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/manu/Coding/Typescript/stocks_scripts/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/Users/manu/Coding/Typescript/stocks_scripts/src/repo.ts:1:23)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module.m._compile (/Users/manu/Coding/Typescript/stocks_scripts/node_modules/ts-node/src/index.ts:1618:23) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/manu/Coding/Typescript/stocks_scripts/node_modules/yahoo-stock-api/package.json',
  requestPath: 'yahoo-stock-api'
}
error Command failed with exit code 1.
colthreepv commented 1 year ago

Yes something went wrong during build maybe? @phamleduy04

Those are the files published in the package, no source, only meta files https://unpkg.com/browse/yahoo-stock-api@2.2.0/ image

phamleduy04 commented 1 year ago

I have published v2.2.1 with the source. Thank you for reporting!

manusobles commented 1 year ago

Kudos to you @phamleduy04 for fixing it!