Preparation:
- install ember
npm install ember-cli
- start a new project:
ember new ember-demo
Now, lets try to remove any plugin (I have tried to remove ember-cli-jshint
and ember-welcome-page
) and we will get broken ember project, any call to ember
utility will cause an error:
Error: Cannot find module 'ember-try-config'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/user/projects/ember-demo/node_modules/ember-cli/node_modules/ember-try/lib/utils/config.js:7:34)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
Here is my environment:
host@user $ ember --version --verbose
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
ember-cli: 2.6.2
http_parser: 2.7.0
node: 5.11.1
v8: 4.6.85.31
uv: 1.8.0
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 47
openssl: 1.0.2h
os: linux x64
PREVIOUS PROBLEM
Previously, I wanted to use eslint instead of jshint in ember app. I just followed instructions from ember-cli-eslint github page, and run this two commands:
npm uninstall --save-dev ember-cli-jshint
ember install ember-cli-eslint
After this my project have turned into a pumpkin: no one ember
command doesn't work, throwing an error (see above)
If you will skip the uninstall step - you won't get a pumpkin)) in this case ember
continues to work as expected, but eslint won't be a default project's linting tool.
DOES ANYBODY KNOW, how to remove unused/unwanted dependencies from ember project carefully?