npm run build not working: missing script: build
See original GitHub issueHow to reproduce the problem Follow the install guide from github README.
Install from source I want to remember you that this is the hardest setup way. You have to install Python/Node.js and type many commands. Install Python Install Node.js Get the source code of doccano: git clone https://github.com/chakki-works/doccano.git Move to doccano directory: cd doccano Create environment for doccano: virtualenv venv Activate environment: source venv/bin/activate Install required packages: pip install -r requirements.txt Move server directory: cd app/server Build frontend library: npm install Build frontend source code: npm run build Back to server directory: cd …/ Initialize doccano: python manage.py migrate Create user: python manage.py createsuperuser Run doccano: python manage.py runserver Stop doccano: Ctrl+C Re-Launch doccano: python manage.py runserver (Confirm you are at app/server directory and environment is active).
Here is where I’ve got into trouble: Move server directory: cd app/server Build frontend library: npm install Build frontend source code: npm run build
So, I do npm install and get: npm WARN doccano No repository field. npm WARN doccano No license field.
up to date in 1.114s found 0 vulnerabilities
After I do npm run build: npm ERR! missing script: build
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-12-10T18_05_07_427Z-debug.log
And here’s what the log has:
0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘build’ ] 2 info using npm@6.12.1 3 info using node@v12.13.1 4 verbose stack Error: missing script: build 4 verbose stack at run (/usr/lib/node_modules/npm/lib/run-script.js:155:19) 4 verbose stack at /usr/lib/node_modules/npm/lib/run-script.js:63:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:435:5 4 verbose stack at checkBinReferences (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45) 4 verbose stack at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:433:3) 4 verbose stack at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5) 4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:382:12 4 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:115:16 4 verbose stack at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:61:3) 5 verbose cwd /opt/text_annotation_tool/doccano/app/server 6 verbose Linux 4.15.0-66-generic 7 verbose argv “/usr/bin/node” “/usr/bin/npm” “run” “build” 8 verbose node v12.13.1 9 verbose npm v6.12.1 10 error missing script: build 11 verbose exit [ 1, true ]_
As the installation guide mentions the frontend, I went in doccano/frontend and did npm install; npm run build there, and it went well. Anyway, when I try to open the main doccano server page, I get the following:
Thank you for the help!
# copy-paste the error message here
Your Environment python 3 node -v =12.13.1 npm -v = 6.12.1
- Operating System:
- Python Version Used:
- When you install doccano:
- How did you install doccano (Heroku button etc):
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
@Prateekmaithil19 i am facing this issue, have found any solution ?
Thank you. I did that, it didnt fix it though. Webpack-stats.json is still missing. Anyway, I managed to use docker, so it’s fine.