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

How Build From Source On Nodejs 20.12.2 - Possible Fixes #25

Open
jangaza opened this issue Apr 27, 2024 · 0 comments
Open

How Build From Source On Nodejs 20.12.2 - Possible Fixes #25

jangaza opened this issue Apr 27, 2024 · 0 comments

Comments

@jangaza
Copy link

jangaza commented Apr 27, 2024

This is a possible fix for anyone having same issues with building from source as me:

  1. ERR_PACKAGE_PATH_NOT_EXPORTED error
PS C:\Users\\soundboard> yarn build
yarn run v1.22.19
warning ..\..\..\..\..\..\..\..\..\..\package.json: No license field
$ react-scripts build && yarn compile
node:internal/modules/cjs/loader:597
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in C:\Users\\soundboard\node_modules\postcss-safe-parser\node_modules\postcss\package.json
    at exportsNotFound (node:internal/modules/esm/resolve:304:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
    at resolveExports (node:internal/modules/cjs/loader:590:36)
    at Module._findPath (node:internal/modules/cjs/loader:667:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1129:27)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\\soundboard\node_modules\postcss-safe-parser\lib\safe-parser.js:1:17)
    at Module._compile (node:internal/modules/cjs/loader:1369:14) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
  1. ERR_OSSL_EVP_UNSUPPORTED error

  2. After successfully running all commands in README:
    Untitled

Step-by-step how to fix these errors (some of then are not nessesery!):

install newest nodejs and yarn
open powershell
git clone https://github.com/LoredCast/soundboard.git
cd soundboard
open package.json and remove all ^ in "dependencies" and "devDependencies"
yarn policies set-version 1.22.19
$env:NODE_OPTIONS="--openssl-legacy-provider"
yarn install
$env:NODE_OPTIONS="--openssl-legacy-provider"
yarn build - error
delete node_modules and yarn.lock
yarn install
yarn build
yarn electron-build
and should work now!

I have no idea what exactly fixed it, but this is summary of my tinkering around.

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

1 participant