orangehrm / orangehrm

OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures all the essential functionalities required for any enterprise.
GNU General Public License v3.0
740 stars 538 forks source link

n3 is not a function. (In 'n3()', 'n3' is an instance of Module) #1808

Closed marciano0695 closed 1 month ago

marciano0695 commented 3 months ago

OrangeHRM version

5.6

Environment details

Describe the bug

Fresh installation via git clone After making command "yarn dev" Captura de ecrã 2024-02-14, às 13 02 46

To reproduce

No response

Expected behavior

No response

Relevant log output

Don't have logs
devishke-orange commented 3 months ago

Hi @marciano0695,

Please let me know your node version. Does yarn dev compile successfully?

marciano0695 commented 3 months ago

Hi @marciano0695,

Please let me know your node version. Does yarn dev compile successfully?

Hi @devishke-orange, I do the yarn dev on src/client, already try with v16.19.1, v18.15.0, v20.11.0 and yes complie successfuly.

I think the error comes from @ohrm/oxd

Captura de ecrã 2024-02-14, às 18 37 33
n3ndor commented 2 weeks ago

Hey, I have the same problem! I can successfully run the following commands:

yarn install yarn build yarn dev

But in the browser, I see the uncaught TypeError as @marciano0695 posted.

Running yarn build returns o is not a function, and running yarn dev returns n3 is not a function.

I can't believe that you didn't share the solution after enduring such a long struggle.

smriad commented 1 week ago

I am also getting same problem. @marciano0695 did you get it solved?

mpark4656 commented 1 week ago

Having the same problem here; exactly same error message in the browser console.

marciano0695 commented 1 week ago

@n3ndor @smriad @mpark4656 Yes i get it solved.

Node version: v16.20.2 Remove node_modules e package.lock (if you have it)

Do not run npm install instead run yarn install with the following yarn.lock: yarn.lock.zip

After that you can run yarn dev or build

I didn't test with another versions of node.

n3ndor commented 1 week ago

hey @marciano0695 ! Thanks, your solution worked for me too.

@smriad @mpark4656

smriad commented 6 days ago

@n3ndor @smriad @mpark4656 Yes i get it solved.

Node version: v16.20.2 Remove node_modules e package.lock (if you have it)

Do not run npm install instead run yarn install with the following yarn.lock: yarn.lock.zip

After that you can run yarn dev or build

I didn't test with another versions of node.

Thanks @marciano0695 . Worked for node version: v20.12.2