#ember not found

1 messages · Page 1 of 1 (latest)

hot charm
#

I'm trying to build my ember project on a fresh server... but I keep getting ember not found...I have ember/ember-cli in my node_modules folder... what else am i missing

#

Ok ... I'm not sure why but npm install didn't install ember-cli from my package.json but i did it manually npm install ember-cli -g and it worked ....

#

I might need to clean up my package.json file to move some stuff from devDependencies to dependencies

#

Ok now different issue.. I'm trying to do a build and it's failing ... but it doesn't do this on my other server...

#

working server

#

failing server

formal comet
#

Did you also do npm install ember-cli -g on the server that is failing? Usually the global modules are installed with the node server

#

Not sure why you’re running into that to begin with, but you could also try prefixing commands with npx or $(npm bin) so that npm will look in the local node_modules

hot charm
#

mhmm ok then maybe I'm going to reinstall everything because I don't remember having to do that either on my first server

#

but running npm install ember-cli -g allowed me to run ember build --prod

#

the problem now is when running that command the build fails

formal comet
#

Do you use the package-lock.json file as well? I generally would recommend it so that your install is the same between your local dev and server

#

If you have a package-lock.json, use npm ci to do a clean install that will match exactly what's in the lockfile