akanix42 / meteor-react-toolbox-example

MIT License
18 stars 1 forks source link

Error on Startup -> TypeError: Cannot set property './a.scss.css' of undefined #13

Open pricetula opened 7 years ago

pricetula commented 7 years ago

I get the error during startup. Package.json { "name": "react-toolbox-test", "private": true, "scripts": { "start": "meteor run" }, "dependencies": { "classnames": "^2.2.5", "meteor-node-stubs": "~0.2.3", "node-sass": "^3.10.1", "normalize.css": "^4.1.1", "react": "^15.1.0", "react-addons-css-transition-group": "^15.1.0", "react-dom": "^15.1.0", "react-toolbox": "^1.0.1", "stylus": "^0.54.5", "sugarss": "^0.2.0" }, "cssModules": { "extensions": [ "scss" ], "globalVariables": [ "node_modules/react-toolbox/lib/_colors.scss", { "theme-building": true }, "client/toolbox-theme.scss" ] } }

[Error: File '/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/vars' not found at any of the following paths: ["/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/vars","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/vars.scss","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/vars.sass","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/_vars","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/_vars.scss","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/include-path/_vars.sass"]] [Error: File '/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/colors' not found at any of the following paths: ["/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/colors","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/colors.scss","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/colors.sass","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/_colors","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/_colors.scss","/home/pricetula/METEOR/startupconnect/node_modules/node-sass/test/fixtures/sass-path/_colors.sass"]] /home/pricetula/.meteor/packages/meteor-tool/.1.4.1_1.1l5666a++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:165 throw error; ^

TypeError: Cannot set property './a.scss.css' of undefined at ImportScanner._checkSourceAndTargetPaths (/tools/isobuild/import-scanner.js:275:7) at /tools/isobuild/import-scanner.js:178:12 at Array.forEach (native) at ImportScanner.addInputFiles (/tools/isobuild/import-scanner.js:177:11) at /tools/isobuild/compiler-plugin.js:1011:15 at Array.forEach (native) at Function.computeJsOutputFilesMap (/tools/isobuild/compiler-plugin.js:982:19) at ClientTarget.emitResources (/tools/isobuild/bundler.js:930:8) at /tools/isobuild/bundler.js:701:12 at /tools/utils/buildmessage.js:359:18 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at /tools/utils/buildmessage.js:352:34 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at /tools/utils/buildmessage.js:350:23 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at Object.enterJob (/tools/utils/buildmessage.js:324:26) at ClientTarget.make (/tools/isobuild/bundler.js:692:18) at /tools/isobuild/bundler.js:2586:14 at /tools/isobuild/bundler.js:2675:20 at Array.forEach (native) at Function..each._.forEach (/home/pricetula/.meteor/packages/meteor-tool/.1.4.1_1.1l5666a++os.linux.x86_32+web.browser+web.cordova/mt-os.linux.x86_32/dev_bundle/lib/node_modules/underscore/underscore.js:79:11) at /tools/isobuild/bundler.js:2674:7 at /tools/utils/buildmessage.js:271:13 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at /tools/utils/buildmessage.js:264:29 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at /tools/utils/buildmessage.js:262:18 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at /tools/utils/buildmessage.js:253:23 at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14) at Object.capture (/tools/utils/buildmessage.js:252:19) at bundle (/tools/isobuild/bundler.js:2567:31) at /tools/isobuild/bundler.js:2514:32 at Object.withCache (/tools/fs/files.js:1585:12) at Object.exports.bundle (/tools/isobuild/bundler.js:2514:16) at /tools/runners/run-app.js:582:36 at Function.run (/tools/tool-env/profile.js:489:12) at bundleApp (/tools/runners/run-app.js:572:34) at AppRunner._runOnce (/tools/runners/run-app.js:625:35) at AppRunner._fiber (/tools/runners/run-app.js:884:28) at /tools/runners/run-app.js:402:12

npm ERR! Linux 4.4.0-45-generic npm ERR! argv "/home/pricetula/.nvm/versions/node/v5.11.1/bin/node" "/home/pricetula/.nvm/versions/node/v5.11.1/bin/npm" "start" npm ERR! node v5.11.1 npm ERR! npm v3.8.6 npm ERR! code ELIFECYCLE

Garbolino commented 7 years ago

same issue here using MacOX. I'm trying to use it with Meteor 1.4 but it does not work. Thank you for the help!

fede-rodes commented 7 years ago

Based on this other issue: https://github.com/nathantreid/meteor-react-toolbox-example/issues/10

in my case I got rid of the error by adding the ignorePaths line:

  "cssModules": {
    "extensions": [
      "scss",
      "css"
    ],
    "globalVariables": [
      "node_modules/react-toolbox/lib/_colors.scss",
      {
        "theme-building": true
      },
      "client/toolbox-theme.scss"
    ],
    "ignorePaths": [
      "node_modules/node-sass/test"
    ]
  }
fede-rodes commented 7 years ago

Another comment, after updating the project to meteor 1.4.2.3 I got another set of issues... For me the solution was as follows: 1- update react-toolbox to the latest version; 2- add babel-runtime; 3- run 'meteor reset' to update the project to the latest mongoDB version.

This is my package.json:


{
  "name": "react-toolbox-test",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "babel-runtime": "^6.20.0",
    "meteor-node-stubs": "~0.2.3",
    "normalize.css": "^4.1.1",
    "react": "^15.1.0",
    "react-addons-css-transition-group": "^15.1.0",
    "react-dom": "^15.1.0",
    "react-toolbox": "^1.3.4"
  },
  "devDependencies": {
    "node-sass": "^3.4.2"
  },
  "cssModules": {
    "extensions": [
      "scss",
      "css"
    ],
    "globalVariables": [
      "node_modules/react-toolbox/lib/_colors.scss",
      {
        "theme-building": true
      },
      "client/toolbox-theme.scss"
    ],
    "ignorePaths": [
      "node_modules/node-sass/test"
    ]
  }
}

Hope it helps :)