grommet / grommet-toolbox

[DEPRECATED] Developer Environment for Grommet applications
Apache License 2.0
13 stars 24 forks source link

Trying to load current options causes errors with FS #47

Closed tomaszlach86 closed 7 years ago

tomaszlach86 commented 7 years ago

Hi,

I am trying to access current options according to wiki by addingh the following lines to a file:

import {getOptions} from 'grommet-toolbox';

const options = getOptions();

Unfortunately, when I do that, the application stops working and I see a bunch of errors. Stacktraces shows a lot of errors like this:

ERROR in ./~/default-require-extensions/js.js
Module not found: Error: Cannot resolve module 'fs' in C:\Users\lachto\Documents\Chat2.0\node_modules\default-require-ex
tensions
 @ ./~/default-require-extensions/js.js 3:9-22
webpack: Failed to compile.

Can anybody help me with the issue?

tomaszlach86 commented 7 years ago

Tried to modify webpack.dev.config.js by adding:

   node: {
        console: true,
        fs: 'empty',
        net: 'empty',
        tls: 'empty'
    }

or

target: 'node'

but nothing has changed.

alansouzati commented 7 years ago

can you confirm your node and npm versions? I cannot produce this. the fs module is native to node.

Grommet core uses toolbox and changes the default webpack configuration, check it out:

https://github.com/grommet/grommet/blob/master/grommet-toolbox.config.js#L50

This is where I would see your node configuration added.

tracybarmore commented 7 years ago

Hey @tomaszlach86, sorry to be 'that guy', but we will be cleaning up our backlog next week by closing unresponsive issues that haven't been active for at least 30 days. If you would like this issue to remain open in our backlog, please comment to let us know. Thanks!

tracybarmore commented 7 years ago

Closing issue based on 30 days of inactivity. Feel free to reopen this issue if it still needs our attention. Thanks!