akanix42 / meteor-react-toolbox-example

MIT License
18 stars 1 forks source link

Error on startup #10

Open tgoldenberg opened 8 years ago

tgoldenberg commented 8 years ago

Followed the instructions for getting started. Not using react-toolbox, but material-ui instead. Here is the package.json

{
  "name": "app",
  "private": true,
  "scripts": {
    "start": "meteor run",
    "build-stage": "./.scripts/build_app.sh",
    "test-app": "./.scripts/test_app.sh",
    "gzip": "./.scripts/gzip_files.sh",
    "launch-app": "./.scripts/launch_app.sh",
    "clear-cache": "cd .meteor/local/bundler-cache/linker && rm *",
    "build-test": "./.scripts/build_test.sh"
  },
  "dependencies": {
    "amqplib": "^0.4.2",
    "btoa": "^1.1.2",
    "d3": "^4.1.1",
    "material-ui": "^0.15.2",
    "meteor-node-stubs": "^0.2.3",
    "moment": "^2.14.1",
    "react": "^15.2.0",
    "react-addons-css-transition-group": "^15.2.1",
    "react-addons-pure-render-mixin": "^15.2.0",
    "react-addons-shallow-compare": "^15.2.0",
    "react-dom": "^15.2.0",
    "react-motion": "^0.4.4",
    "react-redux": "^4.4.5",
    "react-router": "^2.5.2",
    "react-router-redux": "^4.0.5",
    "react-selectize": "https://github.com/tgoldenberg/react-selectize/tarball/add_js",
    "react-tap-event-plugin": "^1.0.0",
    "redux": "^3.5.2",
    "redux-thunk": "^2.1.0",
    "underscore": "^1.8.3"
  },
  "devDependencies": {
    "babel-core": "^6.10.4",
    "babel-plugin-transform-class-properties": "^6.10.2",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-react": "^6.11.1",
    "babel-preset-stage-0": "^6.5.0",
    "mongodb": "^2.2.1",
    "node-sass": "^3.4.2",
    "react-hot-loader": "^3.0.0-beta.2",
    "redbox-react": "^1.2.10",
    "webpack": "^1.13.1"
  },
  "cssModules": {
    "globalVariables": []
  }
}

Error Message:

screen shot 2016-07-20 at 11 01 00 am

Full error message:

 While processing files with nathantreid:css-modules (for target
   web.browser):

   /Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/input.js:61:22:
   /Users/thomasgoldenberg/Desktop/agolo/agolo-v2/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css:14:1:
   Unknown word
   at Input.error
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/input.js:61:22)
   at Parser.unknownWord
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/parser.js:457:26)
   at Parser.word
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/parser.js:174:14)
   at Parser.loop
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/parser.js:60:26)
   at parse
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/parse.js:26:12)
   at new LazyResult
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/lazy-result.js:61:24)
   at Processor.process
   (/Users/thomasgoldenberg/.meteor/packages/nathantreid_css-modules/.2.1.0.x581y4++os+web.browser+web.cordova/plugin.mss.os/npm/node_modules/meteor/mss/node_modules/postcss/lib/processor.js:34:16)
   at CssModulesProcessor.load (packages/mss/css-modules-processor.js:74:5)
   at packages/mss/css-modules-processor.js:33:10
   at tryCallTwo
   (/Users/thomasgoldenberg/.meteor/packages/meteor-tool/.1.3.4_1.2v7655++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/promise/lib/core.js:45:5)
   at doResolve
   (/Users/thomasgoldenberg/.meteor/packages/meteor-tool/.1.3.4_1.2v7655++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/promise/lib/core.js:200:13)
   at new Promise
   (/Users/thomasgoldenberg/.meteor/packages/meteor-tool/.1.3.4_1.2v7655++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/promise/lib/core.js:66:3)
   at CssModulesProcessor.processInternal
   (packages/mss/css-modules-processor.js:28:11)
   at CssModulesProcessor.process
   (packages/mss/css-modules-processor.js:18:26)
   at CssModulesBuildPlugin.processFile
   (packages/mss/css-modules-build-plugin.js:247:22)
   at Array.forEach (native)
   at CssModulesBuildPlugin.compileCssModules
   (packages/mss/css-modules-build-plugin.js:239:34)
   at CssModulesBuildPlugin.processFilesForTarget
   (packages/mss/css-modules-build-plugin.js:62:21)
akanix42 commented 8 years ago

Looks like you (or one of the npm modules you are using) is using the convert-source-map package, which as one of its tests includes a css file with invalid syntax (a double-slash comment).

Meteor's build tool currently processes all files, even if the file isn't being used anywhere in your application,

The simplest way to avoid this is to use the cssModules ignorePaths option. I think this should do the trick:

"cssModules": {
    "globalVariables": [],
    "ignorePaths": [
      "node_modules/convert-source-map/test"
    ] 
  }

Let me know how it goes!

tgoldenberg commented 8 years ago

So that loads the package, but my original .css files are no longer loaded. Also, when I try to import styles from './styles', I get an error that the module was not found. Could this have to do with the babel packages I am using in devDependencies?