akanix42 / meteor-css-modules

MIT License
92 stars 20 forks source link

[2.1.0] Cannot build for SASS with Meteor 1.3.4.1 #51

Closed clayne11 closed 8 years ago

clayne11 commented 8 years ago

I updated to 2.1.0 and I can no longer build my app. It's complaining that it can't find node-sass (which is installed)

// package.json

{
  "name": "r3ntr_meteor",
  "version": "1.0.0",
  "description": "",
  "main": "./entry/server/index.server.js",
  "browser": "./entry/client/index.client.js",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@bitbucket.org/casalova/r3ntr_meteor.git"
  },
  "keywords": [],
  "author": "Casalova Inc.",
  "license": "ISC",
  "homepage": "https://bitbucket.org/casalova/r3ntr_meteor#readme",
  "directories": {
    "test": "tests"
  },
  "config": {
    "noUpdateDependencies": "scrollreveal,leaflet-draw,react-date-picker,history"
  },
  "scripts": {
    "start": "meteor --settings private/dev/settings.json",
    "start:test": "NODE_ENV=test babel-node --presets es2015,stage-0 private/scripts/start.js",
    "test": "NODE_ENV=test babel-node --presets es2015,stage-0 private/scripts/test.js",
    "lint": "eslint --ext .jsx,.js .",
    "lint:fix": "eslint --fix --ext .jsx,.js .",
    "lint:watch": "esw -w --ext .jsx,.js .",
    "meteor-test:watch": "TEST_WATCH=1 meteor test --settings private/dev/test-settings.json --driver-package dispatch:mocha-phantomjs",
    "meteor-test": "meteor test --headless --settings private/dev/test-settings.json --once --driver-package dispatch:mocha-phantomjs --port 5035",
    "chimp:dev": "ROOT_URL=http://localhost:3000/ chimp private/config/chimp.dev.js",
    "chimp:ci": "ROOT_URL=http://localhost:3000/ chimp ./private/config/chimp.ci.js",
    "checkDependencies": "ncu -x $npm_package_config_noUpdateDependencies",
    "updateDependencies": "ncu -x $npm_package_config_noUpdateDependencies -u -a",
    "testPackage": "meteor test-packages --driver-package dispatch:mocha-phantomjs"
  },
  "devDependencies": {
    "autoprefixer": "^6.3.6",
    "babel-cli": "^6.10.1",
    "babel-eslint": "^6.0.4",
    "babel-plugin-transform-class-properties": "^6.9.0",
    "babel-polyfill": "^6.9.0",
    "babel-preset-es2015": "^6.9.0",
    "babel-preset-stage-0": "^6.5.0",
    "babel-register": "^6.9.0",
    "babel-runtime": "^6.9.0",
    "chai": "^3.5.0",
    "chimp": "^0.35.0",
    "enzyme": "^2.3.0",
    "eslint": "^2.13.1",
    "eslint-import-resolver-meteor": "^0.2.4",
    "eslint-import-resolver-node": "^0.2.1",
    "eslint-plugin-flowtype": "^2.2.7",
    "eslint-plugin-import": "^1.8.1",
    "eslint-plugin-react": "^5.1.1",
    "eslint-watch": "^2.1.11",
    "estraverse-fb": "^1.3.1",
    "node-sass": "^3.8.0",
    "postcss-default-unit": "^1.0.0",
    "postcss-modules-extract-imports": "^1.0.1",
    "postcss-modules-scope": "^1.0.1",
    "postcss-modules-values": "^1.1.3",
    "postcss-nested": "^1.0.0",
    "react-hot-loader": "^3.0.0-beta.2",
    "redbox-react": "^1.2.8",
    "redux-devtools": "^3.3.1",
    "shelljs": "^0.7.0",
    "sinon": "^1.17.4",
    "sinon-chai": "^2.8.0"
  },
  "dependencies": {
    "analytics-node": "^2.1.0",
    "analytics.js": "^2.9.1",
    "aws-sdk": "^2.4.1",
    "beanstream-node": "^1.0.0-4-beta",
    "body-parser": "^1.15.1",
    "cheerio": "^0.20.0",
    "classnames": "^2.2.5",
    "cloudinary": "^1.3.1",
    "co": "^4.6.0",
    "denodeify": "^1.2.1",
    "entities": "^1.1.1",
    "fb": "^1.1.0",
    "formsy-react": "^0.18.0",
    "history": "^2.1.2",
    "isomorphic-fetch": "^2.2.1",
    "jquery": "^3.0.0",
    "js-yaml": "^3.6.1",
    "js2xmlparser": "^1.0.0",
    "json2csv": "^3.4.2",
    "leaflet": "^0.7.7",
    "leaflet-draw": "^0.2.4",
    "lodash": "^4.13.1",
    "lru-memoize": "^1.0.1",
    "mapbox.js": "^2.4.0",
    "material-ui": "^0.15.0",
    "md5": "^2.1.0",
    "meteor-node-stubs": "^0.2.3",
    "mobile-detect": "^1.3.2",
    "moment": "^2.13.0",
    "node-rest-client": "^1.8.0",
    "object-path-immutable": "^0.4.0",
    "pluralize": "^3.0.0",
    "prerender-node": "^2.2.2",
    "raf": "^3.2.0",
    "rc-tooltip": "^3.3.2",
    "react": "^15.1.0",
    "react-addons-create-fragment": "^15.1.0",
    "react-addons-css-transition-group": "^15.1.0",
    "react-addons-pure-render-mixin": "^15.1.0",
    "react-addons-test-utils": "^15.1.0",
    "react-date-picker": "^4.0.10",
    "react-day-picker": "^2.0.2",
    "react-dom": "^15.1.0",
    "react-dropzone": "^3.5.1",
    "react-geosuggest": "^1.23.0",
    "react-helmet": "^3.1.0",
    "react-infinite": "^0.9.2",
    "react-komposer-fork": "^1.11.0",
    "react-leaflet": "^0.12.0",
    "react-motion": "^0.4.3",
    "react-popover-fork": "^0.6.4",
    "react-redux": "^4.4.5",
    "react-router": "^2.4.1",
    "react-router-redux": "^4.0.4",
    "react-router-scroll": "^0.2.0",
    "react-select": "^1.0.0-beta13",
    "react-slider-fork": "^0.6.0",
    "react-tap-event-plugin": "^1.0.0",
    "react-textarea-autosize": "^4.0.2",
    "react-tween-state": "^0.1.5",
    "recompose": "^0.20.2",
    "redux": "^3.5.2",
    "redux-form": "^6.0.0-alpha.15",
    "redux-saga": "^0.10.4",
    "redux-thunk": "^2.1.0",
    "request": "^2.72.0",
    "reselect": "^2.5.1",
    "scrollreveal": "^2.3.3",
    "shallowequal": "^0.2.2",
    "sphericalmercator": "^1.0.5",
    "stripe": "^4.7.0",
    "underscore.string": "^3.3.4",
    "velocity-animate": "^1.2.3",
    "xml2js": "^0.4.16"
  },
  "cssModules": {
    "enableSassCompilation": ["scss"],
    "extensions": ["scss"],
    "parser": "postcss-scss",
    "specificArchitecture": false,
    "ignorePaths": [
      "node_modules/react-select",
      "node_modules/highlight.js"
    ],
    "postcssPlugins": {
      "postcss-modules-values": {},
      "postcss-nested": {},
      "postcss-modules-extract-imports": {},
      "postcss-modules-scope": {},
      "autoprefixer": {
        "browsers": [
          "last 2 versions"
        ]
      }
    }
  }
}

Error:

While loading plugin `mss` from package `nathantreid:css-modules`:
error: Can't load npm module 'node-sass' from packages/modules-runtime.js. Check your Npm.depends().
akanix42 commented 8 years ago

Thanks for the report, I'll look into this ASAP.

akanix42 commented 8 years ago

From my testing, I get this error if I use npm install node-sass instead of meteor npm install node-sass. Which command did you use? If you used the former, you will need to npm uninstall node-sass before installing it via meteor npm.

clayne11 commented 8 years ago

I was using npm install. It worked with meteor npm install as you suggested. Thanks for the help.

hyperh commented 8 years ago

I thought there was no difference between meteor npm install and npm install? Just wondering what the difference actually is.

clayne11 commented 8 years ago

I believe that Meteor is bundled with it's own version of node and npm and so using meteor npm uses that bundled version.

With Meteor 1.3.4.1 I'm not really able to use meteor npm. It's using an old version of npm which doesn't install a lot of packages properly. I'm going to stick with nathantreid:css-modules@1.2.0 until Meteor 1.4 comes out which should resolve a lot of dependency issues.

If you run meteor npm on it's own you'll see something like this print at the bottom:

/Users/clayne/.meteor/packages/meteor-tool/.1.3.4_1.14bjllx++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm

As you can see that's the Meteor version of npm. If I do a simple which npm I get back this:

/Users/clayne/.nvm/versions/node/v5.11.1/bin/npm