Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong relative path for bg-script require #6779

Closed
sharifzadesina opened this issue Aug 31, 2018 · 2 comments
Closed

Wrong relative path for bg-script require #6779

sharifzadesina opened this issue Aug 31, 2018 · 2 comments

Comments

@sharifzadesina
Copy link

NWJS Version :
0.32

Expected behavior

This should work:

// inside of bg.js
require('./test.js')

Actual behavior

But it doesn't, the error:

Uncaught Error: Cannot find module './test.js'

How to reproduce

1- create a directory named bg
2- create a test.js file and bg.js file in that directory.
4- write require('./test.js') inside of bg.js.
3- configure nwjs to load bg-script from bg/bg.js.
4- it should work without problem, but as you see it throws module not found error.
5- change the content of bg.js to require('./bg/test.js'), it will work, so wrong relative path.

@stale
Copy link

stale bot commented Aug 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 26, 2019
@sharifzadesina
Copy link
Author

Update!

@stale stale bot removed the stale label Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant