lucidnz / bootstrapify-1

An open-source base theme for Shopify using Twitter Bootstrap
http://bootstrapify-theme.myshopify.com/
187 stars 72 forks source link

boostrap.scss not found or unreadable #146

Closed zkellerdevelops closed 10 years ago

zkellerdevelops commented 10 years ago

Following the install docs here, and when I run "grunt', the install fails on boostrap.scss

Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss.

A little help here? I'm trying like heck to get this theme up and running, but I'm constantly hitting snags. I don't think it should be this hard!

stewartknapman commented 10 years ago

Hi @zkellerdevelops, I just need to ask a couple of (probably silly) questions first:

  1. Did you run all three set up commands: npm install, bower install & bundle install?
  2. Do you have a folder called bower_components and does that contain the bootstrap.scss file at the correct path that the error gave?
  3. (By far the silliest question of all) Does it work if you run grunt again?

The reason I ask about running grunt again is because I have had it happen to me, I run it once, get an error, run it again and it works. Its very intermittent so I haven't been able to work out why it does it.

stewartknapman commented 10 years ago

Failing that can you run grunt --verbose and paste the output?

zkellerdevelops commented 10 years ago
  1. running npm install:

npm WARN prefer global bower@1.3.3 should be installed with -g

1b. running bower install:

bower not-cached https://github.com.twbs/bootsrap-sass# bower resolve https://github.com.twbs/bootsrap-sass# bower not-cached git@github.com:potomak/jquery-instagram.git#~0.3.0 bower resolve git@github.com:potomak/jquery-instagram.git#~0.3.0 bower not-cached git@github.com:luciddesign/uniform-thumbnails.git# bower resolve git@github.com:luciddesign/uniform-thumbnails.git# bower download https://github.com.twbs/bootsrap-sass bower cached git://github.com/jquery/jquery.git#2.1.1 bower validate 2.1.1 against git://github.com/jquery/jquery.git#~2.1.0 bower cached git://github.com/scottjehl/Respond.git#1.4.2 bower validate 1.4.2 against git://github.com/scottjehl/Respond.git#~1.4.2 bower cached git://github.com/twitter/typeahead.js.git#0.9.3 bower validate 0.9.3 against git://github.com/twitter/typeahead.js.git#~0.9.3 The authenticity of host 'github.com (192.30.252.131)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? The authenticity of host 'github.com (192.30.252.131)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Please type 'yes' or 'no': yes Please type 'yes' or 'no':

Please type 'yes' or 'no': bower ENOTFOUND getaddrinfo ENOTFOUND

Stack trace: Error: getaddrinfo ENOTFOUND at errnoException (dns.js:37:11) at Object.onanswer as oncomplete

Console trace: Trace at StandardRenderer.error (/Users/eloist/.rvm/lib/node_modules/bower/lib/renderers/StandardRenderer.js:72:17) at Logger. (/Users/eloist/.rvm/lib/node_modules/bower/bin/bower:111:22) at Logger.EventEmitter.emit (events.js:95:17) at Logger.emit (/Users/eloist/.rvm/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39) at /Users/eloist/.rvm/lib/node_modules/bower/lib/commands/install.js:35:16 at _rejected (/Users/eloist/.rvm/lib/node_modules/bower/node_modules/q/q.js:797:24) at /Users/eloist/.rvm/lib/node_modules/bower/node_modules/q/q.js:823:30 at Promise.when (/Users/eloist/.rvm/lib/node_modules/bower/node_modules/q/q.js:1035:31) at Promise.promise.promiseDispatch (/Users/eloist/.rvm/lib/node_modules/bower/node_modules/q/q.js:741:41) at /Users/eloist/.rvm/lib/node_modules/bower/node_modules/q/q.js:557:44

System info: Bower version: 1.3.3 Node version: 0.10.28 OS: Darwin 13.1.0 x64

1c. running bundle install

Using addressable (2.3.6) Using trollop (2.0) Using filewatcher (0.3.4) Using multi_json (1.10.1) Using multi_xml (0.5.5) Using httparty (0.10.2) Using json (1.5.5) Using launchy (2.4.2) Using sass (3.3.7) Using thor (0.19.1) Using shopify_theme (0.0.17) Using bundler (1.3.5) Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed.

  1. No, I do not have a bower_components folder. It's not in the project folder, or anywhere globally.
  2. running grunt again:

Running "jshint:gruntfile" (jshint) task

1 file lint free.

Running "jshint:assets" (jshint) task

4 files lint free.

Running "uglify:dist" (uglify) task File theme/assets/bootstrapify-option-selection.min.js created. File theme/assets/jquery.instagram.min.js created.

Running "copy:main" (copy) task

Running "concat:dist" (concat) task File "theme/assets/_base.js" created.

Running "sass:dist" (sass) task Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 4 of dist/scss/styles.scss Use --trace for backtrace. Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 5 of dist/scss/checkout.bootstrap.scss from line 2 of dist/scss/checkout.scss Use --trace for backtrace. Warning: Exited with error code 1 Use --force to continue.

Aborted due to warnings.

  1. running grunt --verbose

Initializing Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks. Initializing config...OK

Registering "grunt-contrib-jshint" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-jshint/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-jshint/package.json...OK Loading "jshint.js" tasks...OK

Registering "grunt-contrib-uglify" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-uglify/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-uglify/package.json...OK Loading "uglify.js" tasks...OK

Registering "grunt-contrib-watch" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-watch/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-watch/package.json...OK Loading "watch.js" tasks...OK

Registering "grunt-contrib-sass" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-sass/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-sass/package.json...OK Loading "sass.js" tasks...OK

Registering "grunt-contrib-copy" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-copy/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-copy/package.json...OK Loading "copy.js" tasks...OK

Registering "grunt-contrib-concat" local Npm module tasks. Reading /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-concat/package.json...OK Parsing /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/node_modules/grunt-contrib-concat/package.json...OK Loading "concat.js" tasks...OK

No tasks specified, running default tasks. Running tasks: default

Running "default" task

Running "jshint" task

Running "jshint:gruntfile" (jshint) task Verifying property jshint.gruntfile exists in config...OK Files: Gruntfile.js Options: force=false, reporterOutput=null, curly, eqeqeq, immed, latedef, newcap, noarg, sub, undef, unused, boss, eqnull, globals={"document":true,"window":true,"console":true,"alert":true,"Image":true,"$":true,"jQuery":true,"Shopify":true} JSHint options: force=false, reporterOutput=null, curly, eqeqeq, immed, latedef, newcap, noarg, sub, undef, unused, boss, eqnull, globals={"document":true,"window":true,"console":true,"alert":true,"Image":true,"$":true,"jQuery":true,"Shopify":true} OK

1 file lint free.

Running "jshint:assets" (jshint) task Verifying property jshint.assets exists in config...OK Files: dist/js/base.js, dist/js/bootstrapify-option-selection.js, dist/js/jquery.bootstrapify-dropdowns.js, dist/js/jquery.instagram.js Options: force=false, reporterOutput=null, curly, eqeqeq, immed, latedef, newcap, noarg, sub, undef, unused, boss, eqnull, globals={"document":true,"window":true,"console":true,"alert":true,"Image":true,"$":true,"jQuery":true,"Shopify":true} JSHint options: force=false, reporterOutput=null, curly, eqeqeq, immed, latedef, newcap, noarg, sub, undef, unused, boss, eqnull, globals={"document":true,"window":true,"console":true,"alert":true,"Image":true,"$":true,"jQuery":true,"Shopify":true} OK

4 files lint free.

Running "uglify" task

Running "uglify:dist" (uglify) task Verifying property uglify.dist exists in config...OK Files: dist/js/bootstrapify-option-selection.js -> theme/assets/bootstrapify-option-selection.min.js Files: dist/js/jquery.instagram.js -> theme/assets/jquery.instagram.min.js Options: banner="", footer="", compress={"warnings":false}, mangle=false, beautify=false, report=false Minifying with UglifyJS...Reading dist/js/bootstrapify-option-selection.js...OK OK Writing theme/assets/bootstrapify-option-selection.min.js...OK File theme/assets/bootstrapify-option-selection.min.js created. Minifying with UglifyJS...Reading dist/js/jquery.instagram.js...OK OK Writing theme/assets/jquery.instagram.min.js...OK File theme/assets/jquery.instagram.min.js created.

Running "copy" task

Running "copy:main" (copy) task Verifying property copy.main exists in config...OK Options: encoding="utf8", processContent=false, processContentExclude=[], mode=false

Running "concat" task

Running "concat:dist" (concat) task Verifying property concat.dist exists in config...OK Files: dist/js/jquery.bootstrapify-dropdowns.js, dist/js/base.js -> theme/assets/_base.js Options: separator="\n", banner="", footer="", stripBanners=false, process=false Reading dist/js/jquery.bootstrapify-dropdowns.js...OK Reading dist/js/base.js...OK Writing theme/assets/_base.js...OK File "theme/assets/_base.js" created.

Running "sass" task

Running "sass:dist" (sass) task Verifying property sass.dist exists in config...OK Files: dist/scss/styles.scss -> theme/assets/_base.css Files: dist/scss/checkout.scss -> theme/assets/checkout.css.liquid Options: (none) Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 4 of dist/scss/styles.scss Use --trace for backtrace. Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 5 of dist/scss/checkout.bootstrap.scss from line 2 of dist/scss/checkout.scss Use --trace for backtrace. Warning: Exited with error code 1 Use --force to continue.

Aborted due to warnings.

stewartknapman commented 10 years ago

Ok cool, it looks like bower is the culprit here.

What should be happening is that you get the bower_components folder full of the dependancies like bootstrap when you run bower install, but because that is failing its causing issues further down the track.

To get rid of the npm WARN you'll want to have bower installed globally rather than just local to that folder. The command is npm install -g bower note the -g.

But the main issue looks like bower isn't able to complete its install of the dependancies.

Try changing the bower.json file to this, run bower install again and then let me know how you get on:

{
  "name": "Bootstrapify",
  "version": "3.1.1",
  "homepage": "https://github.com/luciddesign/bootstrapify",
  "authors": [
    "Lucid Design <info@luciddesign.co.nz> (http://www.luciddesign.co.nz)"
  ],
  "description": "An open-source base Shopify theme built with Twitter Bootstrap",
  "main": "dist/styles.scss",
  "keywords": [
    "Bootstrap",
    "Shopify"
  ],
  "license": "Apache-2.0",
  "private": true,
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "bootstrap-sass": "https://github.com/twbs/bootstrap-sass.git#master",
    "typeahead.js": "~0.9.3",
    "jquery": "~2.1.0",
    "respond": "~1.4.2",
    "jquery-instagram": "https://github.com/potomak/jquery-instagram.git#~0.3.0",
    "uniformThumbnails": "https://github.com/luciddesign/uniform-thumbnails.git"
  },
  "resolutions": {
    "jquery": "~2.1.0"
  }
}
stewartknapman commented 10 years ago

@zkellerdevelops make sure you get the edited/updated bower code I just posted. The original wasn't quite right.

zkellerdevelops commented 10 years ago

Ok, I installed bower globally, and I updated the json file. Running npm install i got the same: npm WARN prefer global bower@1.3.3 should be installed with -g

Next, running grunt, it still fails: Running "jshint:gruntfile" (jshint) task

1 file lint free.

Running "jshint:assets" (jshint) task

4 files lint free.

Running "uglify:dist" (uglify) task File theme/assets/bootstrapify-option-selection.min.js created. File theme/assets/jquery.instagram.min.js created.

Running "copy:main" (copy) task

Running "concat:dist" (concat) task File "theme/assets/_base.js" created.

Running "sass:dist" (sass) task Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 5 of dist/scss/checkout.bootstrap.scss from line 2 of dist/scss/checkout.scss Use --trace for backtrace. Syntax error: File to import not found or unreadable: bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss. Load paths: /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify (DEPRECATED) /Users/eloist/Desktop/Nashvillains_site/001_Website_shopify/dist/scss on line 4 of dist/scss/styles.scss Use --trace for backtrace. Warning: Exited with error code 1 Use --force to continue.

Aborted due to warnings.

Man, this is frustrating. Thanks for your help though. Not sure what else I can do here. I've been stuck trying to install this thing for like 2 weeks. Creating my own boostrap shopify theme will take me ages....

stewartknapman commented 10 years ago

Did you get the bower_components folder when you ran the bower install command this time? ('bower install' not 'npm install -g. bower' I realise I might have confused you because I wanted you to run both of them) Also did it want you to authenticate for github this time?

I can see all these commands getting confusing.

  1. 'npm install -g bower' installs the bower command.
  2. 'npm install' looks in 'package.json' and installs the things that grunt needs to run.
  3. 'bower install' looks in 'bower.json' and installs the css/js dependancies like bootstrap and jquery.
stewartknapman commented 10 years ago

@zkellerdevelops I have updated bower.json in master now. It would be interesting to see how you get on with a fresh clone into a new folder. Once you've cloned it just run this one line:

npm install && bower install && bundle install
zkellerdevelops commented 10 years ago

@stewartknapman it worked! Hallelujiah. A fresh clone of the repo into a newly created folder, and I'm good to go.

Thanks so much for your patience. Can't wait to get cracking on this thing now.

stewartknapman commented 10 years ago

@zkellerdevelops Awesome man, glad to here.

thomasdarde commented 10 years ago

I had the same problem. Was related to the presence of a .bowerrc in my home directory. (tried to make bower work with rails in the past)