Build fails with "An output directory must be specified when compiling a directory"
See original GitHub issueThe issue at hand is running a build of Bootstrap after installing it as an npm package. Most of the verification queries (below) are not applicable. There appears to be a bug in the build process.
OS: macOS 10.11.6 … Node.js 8.9.1
I have an Express app, and have installed Bootstrap as a package.json
dependency. I want to produce a modified Bootstrap build and at the moment have made zero modifications.
$ (cd node_modules/bootstrap/; npm install)
This gets the dependencies installed in the Bootstrap package. This took a long time to run.
$ (cd node_modules/bootstrap/; npm run dist)
This attempts to build Bootstrap. The build proceeds fine until this step:
> bootstrap@4.0.0-beta.2 css-compile-docs /Volumes/Drobo5N/drb142101a00015/1/David/NodeWebDevelopment/book-rev4/code/chap06/notes/node_modules/bootstrap
> node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/scss/docs.scss 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-beta.2 css-compile-docs: `node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 assets/scss/docs.scss assets/css/docs.min.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bootstrap@4.0.0-beta.2 css-compile-docs script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It appears from the error message that node-sass
wants a -o directory
option. HOWEVER, the command line is not trying to compile a directory, instead it lists an input file and an output file.
In other words, I suspect an error in using the node-sass
command in the package.json
scripts …?
Your Verification questions
Before opening an issue:
- Search for duplicate or closed issues
- Validate and lint any HTML to avoid common problems
- Prepare a reduced test case for any bugs
- Read the contributing guidelines
When asking general “how to” questions:
- Please do not open an issue here
- Instead, ask for help on StackOverflow, IRC, or Slack
When reporting a bug, include:
- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
- Reduced test cases and potential fixes using CodePen or JS Bin
When suggesting a feature, include:
- As much detail as possible for what we should add and why it’s important to Bootstrap
- Relevant links to prior art, screenshots, or live demos whenever possible
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
How-to questions are to be posted on Stack overflow. As this problem doesn’t happen on vanilla bootstrap, it is invalid
The build tools only work properly from a git clone or tarball.