Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in@babel/helper-compilation-targets/package.json
Ran into the same error and found this:
Solution
This is a regression in Node.js. If you hit this issue from search engines, please choose one of the following solutions
update @babel deps to v7.8.7
use Node < 13.9
wait until nodejs/node#32107 is fixed! (Probably in the next Node.js patch release).
I have simple solution just downgrade Nodejs version to v10 LTS or 11. For example in my Raisl app, my Dockerfile look like this:
FROM ruby:2.7.1ARG DEBIAN_FRONTEND=noninteractiveENV RAILS_ENV=productionENV RAILS_SERVE_STATIC_FILES=trueENV RAILS_LOG_TO_STDOUT=trueRUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ apt-get update && \ apt-get install -qq -y nodejs yarn vim#RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends nodejsCOPY Gemfile* /usr/src/app/WORKDIR /usr/src/appRUN bundle config --global frozen 1RUN bundle config set without 'development test'RUN bundle install #RUN yarn install --prodCOPY . /usr/src/app/# RUN bundle exec rake assets:precompileCMD ["bin/rails", "s", "-b", "0.0.0.0"]
Based on @DoubleMalt answer, I downgraded Node to v13.8.0, it worked. It's an old project.
However, for the current Nuxt project, it hits an error:
ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time
but the project runs fine so far.