You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using an .babelrc with preset babel-preset-react-app to build my components inside a CRA project into commonJS modules. It turned out to be broken after upgraded to 2.0.
I got these errors when building the other project that depends on the module.
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray' in 'xxx-file'
Module not found: Error: Can't resolve '/Users/yyy-username/Documents/zzz-project/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray' in 'xxx-file'
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
babel_interopRequireDefaultusinglocalpath
I found this similar question. As babel team said they would never use absolute path in their code, so I came here.
Environment
Node 10.13.0
MacOS
Steps to Reproduce
install dependencies
npm i -D babel-preset-react-app @babel/cli @babel/plugin-transform-modules-commonjs
create a .babelrc with preset of react-app like this:
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Uh oh!
There was an error while loading. Please reload this page.
Is this a bug report?
Yes
I was using an
.babelrc
with presetbabel-preset-react-app
to build my components inside aCRA
project into commonJS modules. It turned out to be broken after upgraded to 2.0.I got these errors when building the other project that depends on the module.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
babel
_interopRequireDefault
using
local
path
I found this similar question. As babel team said they would never use absolute path in their code, so I came here.
Environment
Node 10.13.0
MacOS
Steps to Reproduce
.babelrc
with preset of react-app like this:index.js
withimport
andexport default
like this:NODE_ENV=production ./node_modules/.bin/babel index.js --config-file ./.babelrc
Expected Behavior
Actually this comes out after I delete
preset-react-app
in babelrc file.Actual Behavior
Reproducible Demo
I created a reproducible demo
Just run
npm test
afternpm install
, you will see the absolute path.The text was updated successfully, but these errors were encountered: