Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors on ubuntu #22177

Closed
tamarmot opened this issue Mar 13, 2017 · 6 comments
Closed

Build errors on ubuntu #22177

tamarmot opened this issue Mar 13, 2017 · 6 comments

Comments

@tamarmot
Copy link

I am getting started customizing bootstrap 4 with sass and trying to compile it on my ubuntu VM. I have tried various versions of node, including 6.x, 7.6, 7.7.2, and always updated the installed packages. I'm on npm 4.4.1.

Compilation fails on the 'docs' step when I call grunt or grunt dist.

Running "exec:sass-docs" (exec) task

> bootstrap@4.0.0-alpha.6 sass-docs /vagrant/xgds_basalt/build/static/bootstrap
> node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css

>> An output directory must be specified when compiling a directory
>> npm ERR! code
>> ELIFECYCLE
>> npm ERR! errno 1
>> npm ERR! bootstrap@4.0.0-alpha.6 sass-docs: `node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css`
>> npm ERR! Exit status 1
>> npm ERR! 
>> npm ERR! Failed at the bootstrap@4.0.0-alpha.6 sass-docs script 'node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css'.
>> npm ERR! Make sure you have the latest version of node.js and npm installed.
>> npm ERR! If you do, this is most likely a problem with the bootstrap package,
>> npm ERR!
>> not with npm itself.
>> npm ERR! Tell the author that this fails on your system:
>> npm ERR!     node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css
>> npm ERR! You can get information on how to open an issue for this project with:
>> npm
>> ERR!     npm bugs bootstrap
>> npm ERR! Or if that isn't available, you can get their info via:
>> npm ERR!     npm owner ls bootstrap
>> npm ERR! There is likely additional logging output above.
>> 
>> npm ERR! A complete log of this run can be found in:
>> npm ERR!     /home/vagrant/.npm/_logs/2017-03-13T17_47_35_964Z-debug.log
>> Exited with code: 1.
>> Error executing child process: Error: Command failed: npm run sass-docs
>> An output directory must be specified when compiling a directory
>> npm ERR! code ELIFECYCLE
>> npm ERR! errno 1
>> npm ERR! bootstrap@4.0.0-alpha.6 sass-docs: `node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css`
>> npm ERR! Exit status 1
>> npm ERR! 
>> npm ERR! Failed at the bootstrap@4.0.0-alpha.6 sass-docs script 'node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css'.
>> npm ERR! Make sure you have the latest version of node.js and npm installed.
>> npm ERR! If you do, this is most likely a problem with the bootstrap package,
>> npm ERR! not with npm itself.
>> npm ERR! Tell the author that this fails on your system:
>> npm ERR!     node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css
>> npm ERR! You can get information on how to open an issue for this project with:
>> npm ERR!     npm bugs bootstrap
>> npm ERR! Or if that isn't available, you can get their info via:
>> npm ERR!     npm owner ls bootstrap
>> npm ERR! There is likely additional logging output above.
>> 
>> npm ERR! A complete log of this run can be found in:
>> npm ERR!     /home/vagrant/.npm/_logs/2017-03-13T17_47_35_964Z-debug.log
Warning: Task "exec:sass-docs" failed. Use --force to continue.

@tamarmot
Copy link
Author

Log file contents:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'sass-docs' ]
2 info using npm@4.4.1
3 info using node@v7.7.2
4 verbose run-script [ 'presass-docs', 'sass-docs', 'postsass-docs' ]
5 info lifecycle bootstrap@4.0.0-alpha.6presass-docs: bootstrap@4.0.0-alpha.6
6 silly lifecycle bootstrap@4.0.0-alpha.6
presass-docs: no script for presass-docs, continuing
7 info lifecycle bootstrap@4.0.0-alpha.6sass-docs: bootstrap@4.0.0-alpha.6
8 verbose lifecycle bootstrap@4.0.0-alpha.6
sass-docs: unsafe-perm in lifecycle true
9 verbose lifecycle bootstrap@4.0.0-alpha.6sass-docs: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/vagrant/xgds_basalt/build/static/bootstrap/node_modules/.bin:/home/vagrant/.rvm/gems/ruby-2.4.0/bin:/home/vagrant/.rvm/gems/ruby-2.4.0@global/bin:/home/vagrant/.rvm/rubies/ruby-2.4.0/bin:/home/vagrant/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/home/vagrant/.rvm/bin:/home/vagrant/.rvm/bin
10 verbose lifecycle bootstrap@4.0.0-alpha.6
sass-docs: CWD: /vagrant/xgds_basalt/build/static/bootstrap
11 silly lifecycle bootstrap@4.0.0-alpha.6sass-docs: Args: [ '-c',
11 silly lifecycle 'node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css' ]
12 silly lifecycle bootstrap@4.0.0-alpha.6
sass-docs: Returned: code: 1 signal: null
13 info lifecycle bootstrap@4.0.0-alpha.6~sass-docs: Failed to exec sass-docs script
14 verbose stack Error: bootstrap@4.0.0-alpha.6 sass-docs: node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:194:7)
14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:194:7)
14 verbose stack at maybeClose (internal/child_process.js:899:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid bootstrap@4.0.0-alpha.6
16 verbose cwd /vagrant/xgds_basalt/build/static/bootstrap
17 verbose Linux 3.13.0-79-generic
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "sass-docs"
19 verbose node v7.7.2
20 verbose npm v4.4.1
21 error code ELIFECYCLE
22 error errno 1
23 error bootstrap@4.0.0-alpha.6 sass-docs: node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css
23 error Exit status 1
24 error Failed at the bootstrap@4.0.0-alpha.6 sass-docs script 'node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the bootstrap package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css
24 error You can get information on how to open an issue for this project with:
24 error npm bugs bootstrap
24 error Or if that isn't available, you can get their info via:
24 error npm owner ls bootstrap
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

@bardiharborow
Copy link
Member

Hey! I've been overhauling the build system, so I suppose bugs were inevitable. I haven't seen anything like this before. The Travis build is passing on Ubuntu Trusty, so the theory is that it must work on Ubuntu. Your environment must be different somehow.

What happens when you do this?

git clone --depth=1 https://github.com/twbs/bootstrap.git
cd bootstrap
npm install
npm test

@hilaryosborne
Copy link

I had the same problem after downloading using the link on the bootstrap website but after directly cloning the repo it works!

@tamarmot
Copy link
Author

I tried your steps and it does get further. FYI I was getting bootstrap from bower this way:
bower install bootstrap#v4.0.0-alpha.6

-- here is the output from your steps :

vagrant@basalt:~/bootstraptest/bootstrap$ npm test

> bootstrap@4.0.0-alpha.6 test /home/vagrant/bootstraptest/bootstrap
> npm run eslint && grunt test


> bootstrap@4.0.0-alpha.6 eslint /home/vagrant/bootstraptest/bootstrap
> eslint --ignore-path .eslintignore js && eslint --config js/tests/.eslintrc.json --env node grunt Gruntfile.js && eslint --config js/tests/.eslintrc.json docs/assets/js/src docs/assets/js/ie-emulation-modes-warning.js docs/assets/js/ie10-viewport-bug-workaround.js

Running "exec:sass" (exec) task

> bootstrap@4.0.0-alpha.6 sass /home/vagrant/bootstraptest/bootstrap
> node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css

>> Rendering Complete, saving .css file...
>> Wrote CSS to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap.css
>> Wrote Source Map to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap.css.map
>> Rendering Complete, saving .css file...
>> Wrote CSS to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap-grid.css
>> Wrote Source Map to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap-grid.css.map
>> Rendering Complete, saving .css file...
>> Wrote CSS to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap-reboot.css
>> Wrote Source Map to /home/vagrant/bootstraptest/bootstrap/dist/css/bootstrap-reboot.css.map

Running "exec:sass-docs" (exec) task

> bootstrap@4.0.0-alpha.6 sass-docs /home/vagrant/bootstraptest/bootstrap
> node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css

>> Rendering Complete, saving .css file...
>> Wrote Source Map to /home/vagrant/bootstraptest/bootstrap/docs/assets/css/docs.min.css.map
>> Wrote CSS to /home/vagrant/bootstraptest/bootstrap/docs/assets/css/docs.min.css

Running "exec:postcss" (exec) task

> bootstrap@4.0.0-alpha.6 postcss /home/vagrant/bootstraptest/bootstrap
> postcss --config grunt/ --replace dist/css/*.css

>> ✔ Finished dist/css/bootstrap-grid.css (975ms)
>> ✔ Finished dist/css/bootstrap-grid.min.css (976ms)
>> ✔ Finished dist/css/bootstrap-reboot.css (976ms)
>> ✔ Finished dist/css/bootstrap-reboot.min.css (976ms)
>> ✔ Finished dist/css/bootstrap.css (977ms)
>> ✔ Finished dist/css/bootstrap.min.css (977ms)

Running "exec:clean-css" (exec) task

> bootstrap@4.0.0-alpha.6 clean-css /home/vagrant/bootstraptest/bootstrap
> cleancss --level 1 --source-map --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --source-map --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --source-map --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css


Running "exec:clean-css-docs" (exec) task

> bootstrap@4.0.0-alpha.6 clean-css-docs /home/vagrant/bootstraptest/bootstrap
> cleancss --level 1 --source-map --output docs/assets/css/docs.min.css docs/assets/css/docs.min.css


Running "babel:dev" (babel) task

Running "concat:bootstrap" (concat) task

Running "babel:dist" (babel) task

Running "stamp:bootstrap" (stamp) task

Running "exec:uglify" (exec) task

> bootstrap@4.0.0-alpha.6 uglify /home/vagrant/bootstraptest/bootstrap
> uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js


Running "exec:scss-lint" (exec) task

> bootstrap@4.0.0-alpha.6 scss-lint /home/vagrant/bootstraptest/bootstrap
> bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss

>> /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in `block in materialize'
>> :
>> Could not find public_suffix-2.0.5 in any of the sources
>> (
>> Bundler::GemNotFound
>> )
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:in `map!'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:80:in `materialize'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/definition.rb:176:in `specs'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/definition.rb:235:in `specs_for'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/definition.rb:224:in `requested_specs'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:118:in `block in definition_method'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:19:in `setup'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler.rb:100:in `setup'
>> from /home/vagrant/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.6/lib/bundler/setup.rb:20:in `<top (required)>'
>> from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
>> from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
>> npm
>> ERR! code ELIFECYCLE
>> npm ERR! errno 1
>> npm ERR! bootstrap@4.0.0-alpha.6 scss-lint: `bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss`
>> npm ERR! Exit status 1
>> npm ERR! 
>> npm ERR! Failed at the bootstrap@4.0.0-alpha.6 scss-lint script 'bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss'.
>> npm ERR! Make sure you have the latest version of node.js and npm installed.
>> npm ERR! If you do, this is most likely a problem with the bootstrap package,
>> npm ERR! not with npm itself.
>> npm ERR! Tell the author that this fails on your system:
>> npm ERR!     bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss
>> npm ERR! You can get information on how to open an issue for this project with:
>> npm ERR!     npm bugs bootstrap
>> npm ERR! Or if that isn't available, you can get their info via:
>> npm ERR!     npm owner ls bootstrap
>> npm ERR! There is likely additional logging output above.
>> npm ERR! A complete log of this run can be found in:
>> npm ERR!     /home/vagrant/.npm/_logs/2017-03-17T17_23_58_540Z-debug.log
>> Exited with code: 1.
>> Error executing child process: Error: Process exited with code 1.
Warning: Task "exec:scss-lint" failed. Use --force to continue.

Aborted due to warnings.


Execution Time (2017-03-17 17:23:49 UTC-0)
exec:sass             1.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 15%
exec:sass-docs       509ms  ▇▇▇▇▇▇▇▇ 6%
exec:postcss          1.5s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 17%
exec:clean-css        1.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 14%
exec:clean-css-docs  487ms  ▇▇▇▇▇▇▇ 6%
babel:dev             1.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 14%
babel:dist           828ms  ▇▇▇▇▇▇▇▇▇▇▇▇ 10%
exec:uglify           1.2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 13%
exec:scss-lint       513ms  ▇▇▇▇▇▇▇▇ 6%
Total 8.7s

npm ERR! Test failed.  See above for more details.
vagrant@basalt:~/bootstraptest/bootstrap$ 

@bardiharborow
Copy link
Member

@tamarmot ah okay. Bootstrap's build system may be broken currently when pulling from non-git sources, as these rely on a manual file include list that may not include all the needed build files. I need to fix that for the next release, but currently there are several pieces being updated. From the output you have provided, it looks like the build will succeed, but you have a corrupted gem install. Try running sudo bundle install.

@mdo
Copy link
Member

mdo commented Apr 9, 2017

Bower doesn't include the docs, so it makes sense that the docs tasks fail. Running anything else should be fine though. Closing out since @bardiharborow is working on refreshing the entire build system anyway and the Gruntfile as it stands today is largely a framework nicety for us to ship Bootstrap vs for others to use.

Perhaps we nuke the Gruntfile from Bower?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants