I'm try to start my first application with ruby on rails and vuejs.
I use https://mkdev.me/en/posts/rails-5-vue-js-how-to-stop-worrying-and-love-the-frontend to learn and create my application as a tutorial.
Everything is good but when i try to run $ foreman start
my cmd throws some error:
21:48:11 frontend.1 | internal/modules/cjs/loader.js:596
21:48:11 frontend.1 | throw err;
21:48:11 frontend.1 | ^
21:48:11 frontend.1 |
21:48:11 frontend.1 | Error: Cannot find module 'ajv'
21:48:11 frontend.1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
21:48:11 frontend.1 | at Function.Module._load (internal/modules/cjs/loader.js:520:25)
21:48:11 frontend.1 | at Module.require (internal/modules/cjs/loader.js:650:17)
21:48:11 frontend.1 | at require (internal/modules/cjs/helpers.js:20:18)
21:48:11 frontend.1 | at Object.<anonymous> (C:\Users\Hieu Vo\AppData\Roaming\npm\node_modules\webpack\node_modules\schema-utils\src\validateOptions.js:11:13)
21:48:11 frontend.1 | at Module._compile (internal/modules/cjs/loader.js:702:30)
21:48:11 frontend.1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
21:48:11 frontend.1 | at Module.load (internal/modules/cjs/loader.js:612:32)
21:48:11 frontend.1 | at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
21:48:11 frontend.1 | at Function.Module._load (internal/modules/cjs/loader.js:543:3)
Here is my Procfile:
rails: rails s -p 3000
frontend: webpack-dev-server
I hope you can help me resolve this issue. Thank you very much.
Try
npm install ajv
Then run again