botpress / nlu

This repo contains every ML/NLU related code written by Botpress in the NodeJS environment. This includes the Botpress Standalone NLU Server.
22 stars 21 forks source link

Cannot import `@botpress/node-svm` #225

Open utanapishtim opened 4 months ago

utanapishtim commented 4 months ago

Make sure the issue is NLU related

Operating system

macOS

Product used

Other

Deploy Option

Sources (NodeJS)

Version

0.0.4

Configuration File

No response

CLI Arguments

npm init -y
npm i -S @botpress/node-svm
echo "const { makeSvm } = require('@botpress/node-svm')" > index.js
node index.js

Environment variables

No response

Description of the bug

importing @botpress/node-svm fails with:

Uncaught:
Error: Cannot find module '/Users/home/scratch/node_modules/@botpress/node-svm/dist/index.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:438:19)
    at Module._findPath (node:internal/modules/cjs/loader:680:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18) {
  code: 'MODULE_NOT_FOUND',
  path: '/Users/home/scratch/node_modules/@botpress/node-svm/package.json',
  requestPath: '@botpress/node-svm'
}
franklevasseur commented 3 months ago

Hey @utanapishtim,

Thanks for letting me know and sorry for the late reply.

I uploaded v0.0.6 which should fix your problem.

Let me know if it worked.

Frank