Open-Xchange-Frontend / generator-ox-ui-module

Boilerplate code for Open-Xchange Appsuite UI modules
MIT License
3 stars 4 forks source link

Can't find variable: require #5

Closed scazzy closed 6 years ago

scazzy commented 6 years ago

image

This occurs on running grunt dev in the app generated by ox-ui-module.

My stack: Node: v8.9.0 Npm: 5.6.1

Also it always throw error about npm when it is installed globally. I've to run add npm in local dependencies to bypass the error. (npm exists in PATH, yet the error) Error: Cannot find module 'npm'

johnyb commented 6 years ago

Unit tests are configured to run in conjunction with a "build" of the frontend/core component (configured in the coreDir setting in grunt/local.conf.json). This build contains a few dependencies, which need to be loaded for the tests to actually run. It would of course be possible to customise all this, but this is out of scope of this project. Also, if you do not need any unit tests, just don't use them. Remove the dependencies from package.json and they should be deactivated.

Concerning the npm error, I can not reproduce this one. It is possibly also something which is out of scope of this project, because it's about npm missing within NODE_PATH environment.

Anyway, I'd be open to suggestions on how to make the situation a little better, but currently I don't see a way to achieve that. The learning curve might be very steep, but as far as I can see at the moment, everything is working as expected.