bylexus / fparse

A JavaScript Formula Parser
http://fparser.alexi.ch/
MIT License
89 stars 15 forks source link

Plain Angular 17 project fail to start #55

Closed boskiv closed 10 months ago

boskiv commented 10 months ago
export class AppComponent {
  constructor(private router: ActivatedRoute) {
    const fObj = new Formula('2^x');
    let result = fObj.evaluate({ x: 3 }); // result = 8
    console.log(result);
  }
}

run start

➜  playroutes git:(master) ✗ yarn start
yarn run v1.22.19
$ nx serve

> nx run playroutes:serve:development

Initial Chunk Files | Names         |  Raw Size
polyfills.js        | polyfills     |  82.71 kB | 
main.js             | main          |  34.11 kB | 
styles.css          | styles        |  95 bytes | 

                    | Initial Total | 116.92 kB

Application bundle generation complete. [1.507 seconds]
Watch mode enabled. Watching for file changes...

 >  NX   Failed to resolve entry for package "fparser". The package may have incorrect main/module/exports specified in its package.json.

   Pass --verbose to see the stacktrace.

 —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Running target serve for project playroutes failed

   Failed tasks:

   - playroutes:serve:development

   Hint: run the command with --verbose for more details.

   View structured, searchable error logs at https://nx.app/runs/KWq4lX62oE

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
bylexus commented 10 months ago

Thanks for pointing this out. This is fixed in release 3.0.1.

Update with: npm install --save fparser@latest