line / line-blockchain-developers-sdk-js

Javascript library for line blockchain developers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

package deployed on npm is not built

fifteenmania opened this issue · comments

Default information

  • lbd-sdk-js version: 1.4.5
  • nodeJs version: 18.13.0
  • module-type(specify type value in package.json): "commonjs"

Description of the bug

  • package manager: yarn
  • web framework: nextjs 13.4.3
  • The deployed package on npm does not include 'dist' directory. It only includes 'lib' directory.
  • It seems the original source code is mistakenly deployed on npm, instead of build result.
  • It causes 'module not found' error when included in my project.
  • When I clone this project and build and import as local package - i.e. @fifteenmania/lbd-sdk-js, the package works fine.

Example codes

import * as LINE from '@line/lbd-sdk-js'

Error logs

- error ./src/pages/api/line-client.js:1:0
Module not found: Can't resolve '@line/lbd-sdk-js'
> 1 | import * as LINE from '@line/lbd-sdk-js'
  2 | 
  3 | export const lineClient = new LINE.HttpClient(process.env.BASE_URL, process.env.SERVICE_API_KEY, process.env.SERVICE_API_SECRET)
  4 | 

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./src/pages/api/protected.ts
- warn Fast Refresh had to perform a full reload due to a runtime error.

Fixed by #119 and will be patched soon.

LGTM

@fifteenmania we have been released v1.4.7, and it looks fine. :)