V3 create application error


I have what seems to be a clean v3 installation, the default OS.js desktop comes up just fine. Now to make an applcation, following these instructions

# Somewhere in your filesystem (or use src/ directory)

# Check out the @osjs/example-application package
git clone https://github.com/os-js/osjs-example-application.git
cd osjs-example-application

# Build source (or `npm run watch` in while developing to automatically rebuild)
npm run build

Error stating webpack not found.

[esbadm@r2-mq projects]$ cd OS.js/
[esbadm@r2-mq OS.js]$ ls
CONTRIBUTING.md Dockerfile npm-debug.log packages.json src
dist LICENSE package.json README.md vfs
docker-compose.yml node_modules package-lock.json session-store.db webpack.config.js
[esbadm@r2-mq OS.js]$ cd src
[esbadm@r2-mq src]$ ls
cli client packages server
[esbadm@r2-mq src]$ git clone https://github.com/os-js/osjs-example-application.git
Cloning into ‘osjs-example-application’…
remote: Counting objects: 89, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 89 (delta 2), reused 4 (delta 1), pack-reused 82
Unpacking objects: 100% (89/89), done.
[esbadm@r2-mq src]$ cd osjs-example-application/
[esbadm@r2-mq osjs-example-application]$ ls
index.js index.scss LICENSE metadata.json package.json README.md server.js webpack.config.js
[esbadm@r2-mq osjs-example-application]$ npm run build

@osjs/example-application@1.1.1 build /home/esbadm/projects/OS.js/src/osjs-example-application

sh: webpack: command not found
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @osjs/example-application@1.1.1 build: webpack
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @osjs/example-application@1.1.1 build 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! /home/esbadm/.npm/_logs/2018-08-21T16_06_12_223Z-debug.log
[esbadm@r2-mq osjs-example-application]$


Run npm install inside the package directory to install deps first.


Thanks. That sorted it.


I added that to the article in the manual. Hopefully others won’t run into that :slight_smile: