KevInSol
KevInSol

Reputation: 2644

error running 'npm run dist' to build bootstrap4

I downloaded and extracted Bootstrap 4 today and am getting an error:

Setup

pwd
/Volumes/projects/bs4_temp/bootstrap-4.0.0
kevin $ dir
total 1432
drwxr-xr-x  14 kevin  staff   16384 28 May 15:36 .
drwxr-xr-x   8 kevin  staff   16384 29 May 15:15 ..
-rwxr-xr-x   1 kevin  staff     313 18 Jan 09:29 .babelrc.js
-rwxr-xr-x   1 kevin  staff     208 18 Jan 09:29 .editorconfig
-rwxr-xr-x   1 kevin  staff      56 18 Jan 09:29 .eslintignore
-rwxr-xr-x   1 kevin  staff    7123 18 Jan 09:29 .eslintrc.json
-rwxr-xr-x   1 kevin  staff     359 18 Jan 09:29 .gitattributes
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 .github
-rwxr-xr-x   1 kevin  staff     517 18 Jan 09:29 .gitignore
-rwxr-xr-x   1 kevin  staff      45 18 Jan 09:29 .stylelintignore
-rwxr-xr-x   1 kevin  staff    6685 18 Jan 09:29 .stylelintrc
-rwxr-xr-x   1 kevin  staff     782 18 Jan 09:29 .travis.yml
-rwxr-xr-x   1 kevin  staff      17 18 Jan 09:29 CNAME
-rwxr-xr-x   1 kevin  staff    3217 18 Jan 09:29 CODE_OF_CONDUCT.md
-rwxr-xr-x   1 kevin  staff     199 18 Jan 09:29 Gemfile
-rwxr-xr-x   1 kevin  staff    1905 18 Jan 09:29 Gemfile.lock
-rwxr-xr-x   1 kevin  staff    1131 18 Jan 09:29 LICENSE
-rwxr-xr-x   1 kevin  staff    9138 18 Jan 09:29 README.md
-rwxr-xr-x   1 kevin  staff    2505 18 Jan 09:29 _config.yml
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 _data
drwxr-xr-x   3 kevin  staff   16384 18 Jan 09:29 _includes
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 _layouts
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 _plugins
drwxr-xr-x   7 kevin  staff   16384 18 Jan 09:29 assets
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 build
-rwxr-xr-x   1 kevin  staff     744 18 Jan 09:29 composer.json
drwxr-xr-x   4 kevin  staff   16384 18 Jan 09:29 dist
drwxr-xr-x   3 kevin  staff   16384 18 Jan 09:29 docs
-rwxr-xr-x   1 kevin  staff    5430 18 Jan 09:29 favicon.ico
-rwxr-xr-x   1 kevin  staff    4384 18 Jan 09:29 index.html
drwxr-xr-x   5 kevin  staff   16384 18 Jan 09:29 js
drwxr-xr-x   2 kevin  staff   16384 18 Jan 09:29 nuget
-rwxr-xr-x   1 kevin  staff  433474 18 Jan 09:29 package-lock.json
-rwxr-xr-x   1 kevin  staff     530 18 Jan 09:29 package.js
-rwxr-xr-x   1 kevin  staff    9152 18 Jan 09:29 package.json
-rwxr-xr-x   1 kevin  staff     123 18 Jan 09:29 robots.txt
-rwxr-xr-x   1 kevin  staff     249 18 Jan 09:29 sache.json
drwxr-xr-x   4 kevin  staff   16384 18 Jan 09:29 scss
-rwxr-xr-x   1 kevin  staff     114 18 Jan 09:29 sw.js

kevin $ npm --version
6.1.0

The error

kevin $ npm run dist

> [email protected] dist /Volumes/projects/bs4_temp/bootstrap-4.0.0
> npm-run-all --parallel css js

sh: npm-run-all: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] dist: `npm-run-all --parallel css js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kevin/.npm/_logs/2018-05-29T16_20_07_838Z-debug.log

Observations

[Ignore this: I believe the current version is 4.1 yet despite looking and trying several times, I seem to be downloading 4.0.0 each time I try. ]

Edit - downloaded 4.1.1 from another computer. This gives same error and also does not have the node_modules dir.

I last looked at this on Feb (at v4.0.0)and running the same NPM command in that older directory works. Comparing the two directories, the one I used in Feb has a node_modules sub dir and the current ZIP does not (nor does the git appear to have one).

Is this my problem, and if so why is node_modules missing from the ZIP file today?

Upvotes: 1

Views: 3726

Answers (1)

Klooven
Klooven

Reputation: 3926

Generally it's not recommended to include node_modules when publishing to the web.

Instead users are expected to install the packages using NPM (in this case). Just run npm install, and NPM will create the folder for you.

Ps. NPM finds the module list from package.json

Upvotes: 2

Related Questions