Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Error with npm run package #1042

Closed
alsessions opened this issue Aug 15, 2017 · 4 comments
Closed

Error with npm run package #1042

alsessions opened this issue Aug 15, 2017 · 4 comments

Comments

@alsessions
Copy link

I am unable to run npm run package . It exits with the below error.

This on localhost (LINUX Mint) with a fresh installation and I have confirmed that package.json matches the one in the repo.

0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'package' ] 2 info using npm@5.3.0 3 info using node@v7.10.1 4 verbose stack Error: missing script: package 4 verbose stack at run (/usr/lib/node_modules/npm/lib/run-script.js:151:19) 4 verbose stack at /usr/lib/node_modules/npm/lib/run-script.js:61:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:114:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:401:5 4 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read$ 4 verbose stack at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:399:3) 4 verbose stack at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:159:5) 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:347:12 4 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16 4 verbose stack at tryToString (fs.js:449:3) 5 verbose cwd /var/www/stan/wp-content/themes/FoundationPress 6 verbose Linux 4.4.0-87-generic 7 verbose argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "package" 8 verbose node v7.10.1 9 verbose npm v5.3.0 10 error missing script: package 11 verbose exit [ 1, true ]

@olefredrik
Copy link
Owner

npm run package was removed from the current version. That's the reason it's not working.

@matthewhegarty
Copy link

So how do we package for production? I checked the documentation and the "First Things First" page says to run npm run package.

@olefredrik
Copy link
Owner

@matthewhegarty Hi. I removed the package script because it was unstable and sometimes caused problems. Thanks for giving a heads up on the blog post / documentation. It has been updated now. To upload the theme to your webserver, simply run npm run build and upload everything in your theme folder except the node_modules and src folders, and you should be good to go.

@matthewhegarty
Copy link

@olefredrik ok - thanks for the clarification

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

No branches or pull requests

3 participants