Meteor 1.3 + Mantra + React problems with react-toolbox


#1

Hi,

When I use the following code in my package.json

“cssModules”: {
“extensions”: [
“scss”
],
“globalVariables”: [
“node_modules/react-toolbox/lib/_colors.scss”,
{
“theme-building”: true
},
“client/toolbox-theme.scss”
],
“outputJsFilePath”: {
".node_modules/.": “{dirname}/{basename}.js”
},
“explicitIncludes”: [
“node_modules/react-toolbox”
]
}

The “explicitIncludes” generates me a problem:
C:\Users\radic\AppData\Local.meteor\packages\templating\1.1.9\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
^
TypeError: Cannot call method ‘substr’ of undefined
at Function. (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\source-map\lib\source-node.js:115:29)
at Array.forEach (native)
at SourceMapConsumer_eachMapping [as eachMapping] (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\source-map\lib\source-map-consumer.js:155:16)
at Function.SourceNode_fromStringWithSourceMap [as fromStringWithSourceMap] (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\source-map\lib\source-node.js:80:26)
at getChunk (C:\tools\isobuild\import-scanner.js:291:20)
at ImportScanner.combineFiles (C:\tools\isobuild\import-scanner.js:299:7)
at C:\tools\isobuild\import-scanner.js:187:14
at Array.forEach (native)
at ImportScanner.addInputFiles (C:\tools\isobuild\import-scanner.js:158:11)
at C:\tools\isobuild\compiler-plugin.js:834:15
at Array.forEach (native)
at Function.computeJsOutputFilesMap (C:\tools\isobuild\compiler-plugin.js:805:19)
at ClientTarget.emitResources (C:\tools\isobuild\bundler.js:913:8)
at C:\tools\isobuild\bundler.js:684:12
at C:\tools\utils\buildmessage.js:359:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:352:34
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:350:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
at ClientTarget.make (C:\tools\isobuild\bundler.js:675:18)
at C:\tools\isobuild\bundler.js:2474:14
at C:\tools\isobuild\bundler.js:2563:20
at Array.forEach (native)
at Function.
.each.
.forEach (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
at C:\tools\isobuild\bundler.js:2562:7
at C:\tools\utils\buildmessage.js:271:13
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:264:29
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:262:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:253:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.capture (C:\tools\utils\buildmessage.js:252:19)
at Object.exports.bundle (C:\tools\isobuild\bundler.js:2455:31)
at C:\tools\runners\run-app.js:591:36
at Function.run (C:\tools\tool-env\profile.js:489:12)
at bundleApp (C:\tools\runners\run-app.js:581:34)
at AppRunner._runOnce (C:\tools\runners\run-app.js:634:35)
at AppRunner._fiber (C:\tools\runners\run-app.js:887:28)
at C:\tools\runners\run-app.js:411:12

I am using react-toolbox and nathantreid:css-modules with the mantra blog example with react.

any help will be appreciated.

Thanks


#2

Could you please put your code and the log between tripple backticks? That makes the code a lot more readable. Thanks!

// Like this

If you type the language used behind the first backtics, the syntax will be correctly highlighted. To see what I mean, go to the raw version of this post: https://forums.meteor.com/raw/23703/2 (Discourse seems to have some trouble with that link, open in a new tab and it will work).


#3

Thanks

"cssModules": {
"extensions": [
"scss"
],
"globalVariables": [
"node_modules/react-toolbox/lib/_colors.scss",
{
"theme-building": true
},
"client/toolbox-theme.scss"
],
"outputJsFilePath": {
".node_modules/.": "{dirname}/{basename}.js"
},
"explicitIncludes": [
"node_modules/react-toolbox"
]
}
C:\Users\radic\AppData\Local.meteor\packages\templating\1.1.9\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
^
TypeError: Cannot call method 'substr' of undefined
at Function. (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\source-map\lib\source-node.js:115:29)
at Array.forEach (native)
at SourceMapConsumer_eachMapping as eachMapping
at Function.SourceNode_fromStringWithSourceMap as fromStringWithSourceMap
at getChunk (C:\tools\isobuild\import-scanner.js:291:20)
at ImportScanner._combineFiles (C:\tools\isobuild\import-scanner.js:299:7)
at C:\tools\isobuild\import-scanner.js:187:14
at Array.forEach (native)
at ImportScanner.addInputFiles (C:\tools\isobuild\import-scanner.js:158:11)
at C:\tools\isobuild\compiler-plugin.js:834:15
at Array.forEach (native)
at Function.computeJsOutputFilesMap (C:\tools\isobuild\compiler-plugin.js:805:19)
at ClientTarget._emitResources (C:\tools\isobuild\bundler.js:913:8)
at C:\tools\isobuild\bundler.js:684:12
at C:\tools\utils\buildmessage.js:359:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:352:34
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:350:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
at ClientTarget.make (C:\tools\isobuild\bundler.js:675:18)
at C:\tools\isobuild\bundler.js:2474:14
at C:\tools\isobuild\bundler.js:2563:20
at Array.forEach (native)
at Function..each..forEach (C:\Users\radic\AppData\Local.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
at C:\tools\isobuild\bundler.js:2562:7
at C:\tools\utils\buildmessage.js:271:13
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:264:29
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:262:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:253:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.capture (C:\tools\utils\buildmessage.js:252:19)
at Object.exports.bundle (C:\tools\isobuild\bundler.js:2455:31)
at C:\tools\runners\run-app.js:591:36
at Function.run (C:\tools\tool-env\profile.js:489:12)
at bundleApp (C:\tools\runners\run-app.js:581:34)
at AppRunner._runOnce (C:\tools\runners\run-app.js:634:35)
at AppRunner._fiber (C:\tools\runners\run-app.js:887:28)
at C:\tools\runners\run-app.js:411:12

#4

You need some configuration changes for the latest versions. See: