Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unknown option: .assumptions. #13452

Closed
1 task
rhoehener opened this issue Jun 10, 2021 · 7 comments
Closed
1 task

[Bug]: Unknown option: .assumptions. #13452

rhoehener opened this issue Jun 10, 2021 · 7 comments
Labels
area: downstream outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@rhoehener
Copy link

rhoehener commented Jun 10, 2021

💻

  • Would you like to work on a fix?

How are you using Babel?

with Expo

Input code

  • expo init (choose a bare template)
  • edit babel.config.js: add assumptions
  • expo start
  • try to open app with expo go

Configuration file name

babel.config.js

Configuration

module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    assumptions: {
    },
  };
};

Current and expected behavior

error when running expo start -c

Failed building JavaScript bundle.
node_modules\expo\AppEntry.js: Unknown option: .assumptions. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

Environment

  System:
    OS: Windows 10 10.0.19041
  Binaries:
    Node: 16.3.0 - C:\Program Files\nodejs\node.EXE
    npm: 7.16.0 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    @babel/core: ^7.9.0 => 7.14.5
    react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2

Possible solution

No response

Additional context

Tried to follow https://babeljs.io/docs/en/babel-plugin-proposal-decorators

It says:

When using the legacy: true mode, the setPublicClassFields assumption must be enabled to support the @babel/plugin-proposal-decorators.

@babel-bot
Copy link
Collaborator

Hey @rhoehener! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@JLHwung
Copy link
Contributor

JLHwung commented Jun 10, 2021

Do you have multiple @babel/core in node_modules? What is the output of npm ls @babel/core?

@rhoehener
Copy link
Author

I only see one such folder.

+-- @babel/core@7.14.5
| `-- @babel/helper-compilation-targets@7.14.5
|   `-- @babel/core@7.14.5 deduped
+-- expo@41.0.1
| +-- @expo/metro-config@0.1.72
| | `-- @expo/config@4.0.2
| |   +-- @babel/core@7.9.0
| |   `-- @babel/preset-typescript@7.12.17
| |     `-- @babel/core@7.14.5 deduped
| +-- babel-preset-expo@8.3.0
| | +-- @babel/plugin-proposal-decorators@7.14.5
| | | +-- @babel/core@7.14.5 deduped
| | | +-- @babel/helper-create-class-features-plugin@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | `-- @babel/plugin-syntax-decorators@7.14.5
| | |   `-- @babel/core@7.14.5 deduped
| | +-- @babel/preset-env@7.12.17
| | | +-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-async-generator-functions@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-dynamic-import@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-export-namespace-from@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-json-strings@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-logical-assignment-operators@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-numeric-separator@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-object-rest-spread@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-optional-catch-binding@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-private-methods@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-proposal-unicode-property-regex@7.14.5
| | | | +-- @babel/core@7.14.5 deduped
| | | | `-- @babel/helper-create-regexp-features-plugin@7.14.5
| | | |   `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-async-generators@7.8.4
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-class-properties@7.12.13
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-dynamic-import@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-export-namespace-from@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-json-strings@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-logical-assignment-operators@7.10.4
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-nullish-coalescing-operator@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-numeric-separator@7.10.4
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-object-rest-spread@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-optional-catch-binding@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-optional-chaining@7.8.3
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-syntax-top-level-await@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-arrow-functions@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-async-to-generator@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-block-scoped-functions@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-block-scoping@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-classes@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-computed-properties@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-destructuring@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-dotall-regex@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-duplicate-keys@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-exponentiation-operator@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-for-of@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-function-name@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-literals@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-member-expression-literals@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-modules-amd@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-modules-systemjs@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-modules-umd@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-named-capturing-groups-regex@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-new-target@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-object-super@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-parameters@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-property-literals@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-regenerator@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-reserved-words@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-shorthand-properties@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-spread@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-sticky-regex@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-template-literals@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-typeof-symbol@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-unicode-escapes@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | +-- @babel/plugin-transform-unicode-regex@7.14.5
| | | | `-- @babel/core@7.14.5 deduped
| | | `-- @babel/preset-modules@0.1.4
| | |   `-- @babel/core@7.14.5 deduped
| | `-- metro-react-native-babel-preset@0.59.0
| |   +-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-proposal-export-default-from@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-syntax-export-default-from@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-syntax-flow@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-object-assign@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-react-display-name@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-react-jsx-self@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-react-jsx-source@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-react-jsx@7.14.5
| |   | `-- @babel/core@7.14.5 deduped
| |   +-- @babel/plugin-transform-runtime@7.14.5
| |   | +-- @babel/core@7.14.5 deduped
| |   | +-- babel-plugin-polyfill-corejs2@0.2.2
| |   | | +-- @babel/core@7.14.5 deduped
| |   | | `-- @babel/helper-define-polyfill-provider@0.2.3
| |   | |   `-- @babel/core@7.14.5 deduped
| |   | +-- babel-plugin-polyfill-corejs3@0.2.2
| |   | | `-- @babel/core@7.14.5 deduped
| |   | `-- babel-plugin-polyfill-regenerator@0.2.2
| |   |   `-- @babel/core@7.14.5 deduped
| |   `-- @babel/plugin-transform-typescript@7.14.5
| |     +-- @babel/core@7.14.5 deduped
| |     `-- @babel/plugin-syntax-typescript@7.14.5
| |       `-- @babel/core@7.14.5 deduped
| `-- expo-constants@10.1.3
|   `-- @expo/config@3.3.43
|     `-- @babel/core@7.9.0
`-- react-native@0.63.2
  +-- @react-native-community/cli@4.14.0
  | `-- metro@0.59.0
  |   +-- @babel/core@7.14.5 deduped
  |   `-- @babel/plugin-external-helpers@7.14.5
  |     `-- @babel/core@7.14.5 deduped
  +-- fbjs-scripts@1.2.0
  | +-- @babel/core@7.14.5 deduped
  | `-- babel-preset-fbjs@3.4.0
  |   +-- @babel/core@7.14.5 deduped
  |   `-- @babel/plugin-syntax-jsx@7.14.5
  |     `-- @babel/core@7.14.5 deduped
  +-- metro-babel-register@0.59.0
  | +-- @babel/core@7.14.5 deduped
  | +-- @babel/plugin-proposal-class-properties@7.12.13
  | | `-- @babel/core@7.14.5 deduped
  | +-- @babel/plugin-proposal-nullish-coalescing-operator@7.14.5
  | | `-- @babel/core@7.14.5 deduped
  | +-- @babel/plugin-proposal-optional-chaining@7.14.5
  | | `-- @babel/core@7.14.5 deduped
  | +-- @babel/plugin-transform-flow-strip-types@7.14.5
  | | `-- @babel/core@7.14.5 deduped
  | +-- @babel/plugin-transform-modules-commonjs@7.14.5
  | | `-- @babel/core@7.14.5 deduped
  | `-- @babel/register@7.14.5
  |   `-- @babel/core@7.14.5 deduped
  `-- metro-react-native-babel-transformer@0.59.0
    +-- @babel/core@7.14.5 deduped
    `-- metro-babel-transformer@0.59.0
      `-- @babel/core@7.14.5 deduped

@rhoehener
Copy link
Author

rhoehener commented Jun 10, 2021

testproject.zip

@JLHwung
Copy link
Contributor

JLHwung commented Jun 10, 2021

As you can see, the @expo/config has @babel/core 7.9.0, which does not support .assumptions. You can run npm dedupe and see if @expo/config can depends on latest versions.

| | `-- @expo/config@4.0.2
| |   +-- @babel/core@7.9.0

Update: It seems that @expo/config specifically locks @babel/core to 7.9.0: https://github.com/expo/expo-cli/blob/fcbe8a7dcc955add3817cfef1f1d92fbaa413ad8/packages/config/package.json#L35 I would suggest open an issue there.

@rhoehener
Copy link
Author

Ok thank you for looking at this. I will pass it on to Expo and MobX.

@hzoo
Copy link
Member

hzoo commented Jun 30, 2021

Looks like we can close this? On our end, maybe we want to add a suggestion to check version numbers and when an option was added (or that link could be enough)

@hzoo hzoo closed this as completed Jun 30, 2021
hzoo added a commit to babel/website that referenced this issue Jun 30, 2021
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: downstream outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

4 participants