I've installed the package with npm install fanuc-macro-b\, but when I try to import {evaluate} from "fanuc-macro-b"; I get the error
testMacro.ts:1:26 - error TS2307: Cannot find module 'fanuc-macro-b' or its corresponding type declarations.
1 import { evaluate } from "fanuc-macro-b";
~~~~~~~~~~~~~~~
Found 1 error in testMacro.ts:1
If I do instead import {evaluate} from "fanuc-macro-b/src/utils"; (like on the demos). I get the error:
acc[tokType.name] = tokType;
^
TypeError: Cannot read properties of undefined (reading 'name')
at ~/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js:68:29
at arrayReduce (~/node_modules/lodash/_arrayReduce.js:21:19)
at reduce (~/node_modules/lodash/reduce.js:48:10)
at RecognizerEngine.initRecognizerEngine (~/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js:67:51)
at MacroParser.Parser (~/node_modules/chevrotain/lib/src/parse/parser/parser.js:93:14)
at MacroParser.CstParser [as constructor] (~/node_modules/chevrotain/lib/src/parse/parser/parser.js:224:23)
at new MacroParser (~/fanuc-macro-b/src/MacroParser.js:28:28)
at Object.<anonymous> (~/fanuc-macro-b/src/MacroParser.js:232:18)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
Node.js v18.7.0
I get the same errors trying to run the demos.
npm ls returns
├── fanuc-macro-b@0.1.0 -> ./fanuc-macro-b
└── ts-typed-events@3.0.0
I've installed the package with
npm install fanuc-macro-b\, but when I try toimport {evaluate} from "fanuc-macro-b";I get the errorIf I do instead
import {evaluate} from "fanuc-macro-b/src/utils";(like on the demos). I get the error:I get the same errors trying to run the demos.
npm lsreturns