ember-render-modifiers icon indicating copy to clipboard operation
ember-render-modifiers copied to clipboard

Node 12/14 unsupported?

Open stephencweiss opened this issue 4 years ago • 4 comments
trafficstars

As Node 10 is coming up on EOL, I tried to update my project to Node 14 (and 12). In both cases, when I did, I got the following build error:

Build Error (broccoli-persistent-filter:Babel > [Babel: @ember/render-modifiers]) in @ember/render-modifiers/modifiers/did-insert.js

No "exports" main defined in /Users/stephen.weiss/code/olo/expo-web-client/node_modules/@ember/render-modifiers/node_modules/@babel/helper-compilation-targets/package.json


Stack Trace and Error Report: /var/folders/dz/43k2z2yn53g6g5wgzbx0gw8m0000gp/T/error.dump.f35dc8ac0b4685c4fa73ca1fd5ee7483.log

Is there anything we can do to accommodate newer Node versions? Or is there any recommended path forward?

My believe is that I am currently only using this in one place:

<form onKeyPress={{action this.handleKeyPress}} onSubmit={{action this.handleFormSubmit}}
          {{did-insert this.handleFormInsert}} tabindex="0">
    //...
</form>

where handleFormInsert is really meant to just add focus:

  handleFormInsert(element) {
    element.focus();
  }

stephencweiss avatar Apr 02 '21 18:04 stephencweiss

@stephencweiss - I've been using this package for a long time, right now on Node 15, but before that on Node 14. I've never seen that error. Are you sure it's related to Node's version? I would find that strange.

boris-petrov avatar Apr 04 '21 15:04 boris-petrov

@boris-petrov certainly not sure of it, but was pretty sure that was the only change I'd made to the project. Will give it another shot today to confirm.

stephencweiss avatar Apr 05 '21 13:04 stephencweiss

Confirmed, the only change in my project is that I bumped node from v10 to v14.16. Now it won't compile.

stephencweiss avatar Apr 05 '21 17:04 stephencweiss

Fwiw - the error seems right, when I follow the error and look at @ember/render-modifiers/node_modules/@babel/helper-compilation-targets/package.json, I see the following:

{
  "name": "@babel/helper-compilation-targets",
  "version": "7.8.3",
  "author": "The Babel Team (https://babeljs.io/team)",
  "license": "MIT",
  "description": "Engine compat data used in @babel/preset-env",
  "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-compilation-targets",
  "main": "lib/index.js",
  "exports": false,
  "publishConfig": {
    "access": "public"
  },
  "keywords": [
    "babel",
    "babel-plugin"
  ],
  "dependencies": {
    "@babel/compat-data": "^7.8.1",
    "browserslist": "^4.8.2",
    "invariant": "^2.2.4",
    "levenary": "^1.1.0",
    "semver": "^5.5.0"
  },
  "peerDependencies": {
    "@babel/core": "^7.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.3",
    "@babel/helper-plugin-test-runner": "^7.8.3"
  },
  "gitHead": "a7620bd266ae1345975767bbc7abf09034437017"
}

Note the exports key.

stephencweiss avatar Apr 05 '21 17:04 stephencweiss