uasoft-indonesia / badaso

Laravel Vue headless CMS / admin panel / dashboard / builder / API CRUD generator, anything !
https://badaso.uatech.co.id
MIT License
1.21k stars 223 forks source link

yarn dev after secondly run after install is error #385

Closed ceceps closed 2 years ago

ceceps commented 3 years ago

Describe the bug Error when run yarn dev after second execution

To Reproduce Steps to reproduce the behavior: my setup

  1. composer create-project badaso/starter crm_proj
  2. yarn
  3. yarn dev Install on first yarn dev it's successful but has the warning no exit code
  4. console exit
  5. php artisan serve
  6. ctrl+ c ( to stop server)
  7. yarn dev (second execution), has error below
$ yarn dev
yarn run v1.22.10
$ npm run development

> development
> mix

✖ Mix
  Compiled with some errors in 11.31s

ERROR in ./node_modules/canvg/lib/index.es.js 1933:16-23
Module not found: Error: Can't resolve 'process/browser' in '/home/ceceps/docker/apache-php7.4-portal/htdocs/crm_proj/node_modules/canvg/lib'
Did you mean 'browser.js'?
BREAKING CHANGE: The request 'process/browser' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

webpack compiled with 1 error
error Command failed with exit code 1.

Expected behavior run smooth with laravel mix successfull message

Screenshots Screenshot from 2021-09-25 20-12-22

rizkiheryandi commented 3 years ago

Refference Note for contributor :

ceceps commented 3 years ago

@rizkiheryandi i had add this script on webpack.mix.js

mix.options({
    legacyNodePolyfills: false
});

compile mix is success build but strange badaso dashboard apps cannot login and the post theme module is blank, at login, it redirected to not found route.

I inspect on console browser:

Uncaught ReferenceError: process is not defined
    at Module../vendor/badaso/core/src/resources/js/api/index.js (badaso.js:29461)
    at __webpack_require__ (badaso.js:310330)
    at badaso.js:310625
    at badaso.js:310942
    at badaso.js:310944

if remove that script again and compile again but with has an error process/browser, the apps can show and login as usually .

rizkiheryandi commented 3 years ago

@ceceps

Dont need to add egacyNodePolyfills: false

You can just ignore the error on yarn / npm log for now, because badaso still running as usually, but for sure we will try to fix it soon.

musfandi commented 2 years ago

any fix update

rizkiheryandi commented 2 years ago

need to find the better library replacement or waiting for the update #430

rizkiheryandi commented 2 years ago

To fix this issue, you can update the jsPDF module to latest version https://github.com/parallax/jsPDF/releases/tag/v2.4.0

you can run npm update