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

Node.js v18.x build error #83

Open
rhastie opened this issue Apr 25, 2022 · 7 comments
Open

Node.js v18.x build error #83

rhastie opened this issue Apr 25, 2022 · 7 comments

Comments

@rhastie
Copy link

rhastie commented Apr 25, 2022

I'm currently using Node.js v16 LTS for production but testing Node.js v18. I am seeing build errors under Node.js v18.x... Any suggestions welcome?

[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.1: The platform "linux" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "react-admin > connected-react-router@6.8.0" has unmet peer dependency "immutable@^3.8.1 || ^4.0.0-rc.1".
warning "react-admin > connected-react-router@6.8.0" has unmet peer dependency "history@^4.7.2".
warning "react-admin > connected-react-router@6.8.0" has incorrect peer dependency "react@^16.4.0".
warning "react-admin > connected-react-router@6.8.0" has unmet peer dependency "seamless-immutable@^7.1.3".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 129.12s.
yarn run v1.22.15
$ react-scripts build
node:internal/modules/cjs/loader:489
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/nmos-js/Development/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:372:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:719:3)
    at resolveExports (node:internal/modules/cjs/loader:483:36)
    at Module._findPath (node:internal/modules/cjs/loader:523:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:925:27)
    at Module._load (node:internal/modules/cjs/loader:780:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/nmos-js/Development/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v18.0.0
error Command failed with exit code 1.
@garethsb
Copy link
Contributor

@peterbrightwell
Copy link

@rhastie @garethsb did you get this working? The postcss issue suggested npm install postcss but that's not working for me with Node 19.

@peterbrightwell
Copy link

Nor with node.js v18.12.1, using corepack and yarn (and yarn add postcss)

@peterbrightwell
Copy link

peterbrightwell commented Nov 11, 2022

In the meantime I've downgraded to node v16.18.1 (with corepack 0.14.1 and yarn 3.2.4) and yarn start runs.

(Mac users: uninstalling node that was installed using the installer is hard work, I'd recommend Homebrew :) )

@garethsb
Copy link
Contributor

garethsb commented Oct 4, 2023

Hey, @jonathan-r-thorpe, any thoughts on supporting Node v18+ ?

@rhastie
Copy link
Author

rhastie commented Oct 4, 2023

So I've just checked the same issue is happening with Node v20.x as well. Is there anything we can do as it potentially just looks like a new syntax issue with later versions of Node

@jonathan-r-thorpe
Copy link
Contributor

@garethsb in the short term pragmatically updating incompatible library versions just enough to mitigate this issue, but not so much that it requires a complete overhaul of the codebase. I'll schedule some time next week to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants