Content
You are here:
error upgrading OP: Cannot resolve module [SOLVED]
Added by Alessandro Proglio about 9 years ago
Hello,
I’m trying to upgrade from 5.0.5 to 5.0.15, I’m not using the packaged version since my server has ubuntu 12.4. I’ve tried to put together from different guides the correct sequence of commands in order to upgrade, but there’s something wrong.
git reset --hard git fetch git checkout v5.0.15 bundle install --no-deployment RAILS_ENV="production" bundle exec rake tmp:clear npm install RAILS_ENV="production" bundle exec rake db:migrate db:seed assets:precompile
but I get the following error:
$(npm bin)/webpack --config webpack.config.js {"openproject-translations":"/home/openproject/openproject/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-translations-c5146cc45b62"} ts-loader: Using typescript@1.7.5 and /home/openproject/openproject/frontend/tsconfig.json Hash: 16c05cc4f4d3e1683c45 Version: webpack 1.10.0 Time: 104483ms Asset Size Chunks Chunk Names 7b9776076d5fceef4993b55c9383dedd.gif 1.85 kB [emitted] openproject-core-app.js 5.15 MB 0 [emitted] core-app openproject-global.js 2.59 MB 1 [emitted] global openproject-translations.js 628 kB 2 [emitted] translations openproject-core-app.css 4.63 kB 0 [emitted] core-app openproject-global.css 30.6 kB 1 [emitted] global [952] ./templates \.html$ 3.16 kB {0} [built] [1024] ./components ^((?!\.(test|spec)).)*\.(js|ts|html)$ 7.05 kB {0} [built] [1257] /home/openproject/openproject/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-translations-c5146cc45b62/config/locales nonrecursive js-[\w|-]{2,5}\.yml$ 714 bytes {2} [built] + 1291 hidden modules ERROR in ./global.js Module not found: Error: Cannot resolve module 'angular-ui-select/dist/select' in /home/openproject/openproject/frontend/app @ ./global.js 70:0-40 ERROR in ./global.js Module not found: Error: Cannot resolve module 'angular-ui-select/dist/select.css' in /home/openproject/openproject/frontend/app @ ./global.js 71:0-44 ERROR in ./global.js Module not found: Error: Cannot resolve module 'angular-hypermedia' in /home/openproject/openproject/frontend/app @ ./global.js 73:0-29 ERROR in ./global.js Module not found: Error: Cannot resolve module 'linkheader-parser' in /home/openproject/openproject/frontend/app @ ./global.js 74:0-28 ERROR in ./global.js Module not found: Error: Cannot resolve module 'mediatype-parser' in /home/openproject/openproject/frontend/app @ ./global.js 75:0-27 ERROR in ./global.js Module not found: Error: Cannot resolve module 'uri-templates' in /home/openproject/openproject/frontend/app @ ./global.js 76:0-43 ERROR in ./openproject-app.js Module not found: Error: Cannot resolve module 'ng-file-upload/ng-file-upload' in /home/openproject/openproject/frontend/app @ ./openproject-app.js 64:0-23 Child extract-text-webpack-plugin: + 2 hidden modules Child extract-text-webpack-plugin: + 2 hidden modules Child extract-text-webpack-plugin: + 2 hidden modules Child extract-text-webpack-plugin: + 2 hidden modules Child extract-text-webpack-plugin: + 2 hidden modules Child extract-text-webpack-plugin: + 5 hidden modules
and the homepage of my installation is missing some functionalities (no dropdown menu)
what’s wrong?
Replies (10)
Hey Allesandro,
did you run
npm install
? If so, what is its output?The error is related to npm missing a module.
Best,
Oliver
yes, npm install returns:
That output is only an unrelated warning.
What version of npm and node are you using?
I’ve tried to manually install the missing modules,
but still something is missing:
for instance, I’m using the repository openproject, not openproject-ce. Is it relevant?
Nope, that should not make any difference.
Not sure where exactly that error stems from, but it must be related to your node installation. Can you try to remove the
frontend/node_modules
folder and re-install withnpm install
, ensuring that the modules printed in your comment are installed intofrontend/node_modules/<angular-ui-select/ng-file-upload>/..
etc?Best,
Oliver
I can’t find those modules in frontend/node_modules. I fear that during the latest upgrade I did something wrong.
I’m now trying to reinstall OP in another directory and restore the backup and the attachments.
the new installation is working fine. I do not investigate further the problem since probably it is due to something that I screwed up.
Hey Allessandro,
thanks for the update. If the node_modules are missing, somehow npm wasn’t doing what its supposed to do.
Sorry we could not be of more help, but I’m glad you could resolve it by the rather drastic re-installation.
Best,
Oliver