when I deploy the popcorn-master demo project with mop command, I always get error say
Error: ENOENT, open '/Users/luokai/work/montagejs/popcorn-master-2/node_modules/digit/node_modules/matte/package.json'
I reinstall mop, q-io same error still happen
Could you tell me how to resolve this?
I’ve reproduced the problem locally and will attempt to isolate the problem.
I have fixed this problem by updating Montage and Popcorn. Mop requires certain "developer dependencies" to be installed as "dependencies" in order for them to be available when Montage itself is a dependency of another package, as in Popcorn. Particularly, Mr, Q, and Q-IO have to be installed by npm. I have taken the liberty to fix Montage on master, and pending release, updated Popcorn to depend directly on the version of Montage in Github.
If you grab a fresh clone or merge/rebase from Popcorn upstream and run
npm run mop, the build should run without problems and produce a usable builds/Popcorn. I verified this locally, but please let me know if this works for you.
Thanks for you fixing, but seems things are getting worse to me. I clone the latest popcorn-master from https://github.com/montagejs/popcorn.git and use npm run mop to build. This time I god errors about missing modules like q, q-io, domelementtype, etc. After I install them all. I got error
kevinluos-air:popcorn-master-git luokai$ npm run mop
Popcorn@0.3.0 mop /Users/luokai/work/montagejs/popcorn-master-git
Error: ENOENT, open '/Users/luokai/work/montagejs/popcorn-master-git/node_modules/montage/node_modules/q-io/package.json'
npm ERR! weird error 8
npm ERR! not ok code 0
Thanks, I’ll make sure that the dependencies are properly checked in today.
Since I (temporarily) switched the Montage dependency to use git instead of npm to install, Montage’s own .gitignore was preventing its node_modules from being checked in. I have, again temporarily, removed the node_modules/montage/.gitignore and checked in node_modules/montage/node_modules.
As soon as there is a Montage release that contains the dependency fixes, Popcorn can be updated to use the release version, update the checked-in dependencies, and this problem should disappear.
Thanks! It works fine to me now