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

Trouble running nuxt without environment variable #2

Open
napulen opened this issue Feb 11, 2023 · 2 comments
Open

Trouble running nuxt without environment variable #2

napulen opened this issue Feb 11, 2023 · 2 comments

Comments

@napulen
Copy link

napulen commented Feb 11, 2023

Trying to run the command npm run dev resulted in the following error for me:

> vimu@1.0.0 dev
> nuxt

ℹ Parsed 23 files in 0.6 seconds                                                                                                                                                         @nuxt/content 21:04:02

   ╭────────────────────────────────────────────╮
   │                                            │
   │   Nuxt @ v2.15.8                           │
   │                                            │
   │   ▸ Environment: development               │
   │   ▸ Rendering:   server-side               │
   │   ▸ Target:      server                    │
   │                                            │
   │   Listening: http://0.0.0.0:3000/   │
   │                                            │
   ╰────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                                    21:04:03
ℹ Initial build may take a while                                                                                                                                                                       21:04:03
ℹ Discovered Components: .nuxt/components/readme.md                                                                                                                                                    21:04:03
✔ Builder initialized                                                                                                                                                                                  21:04:03
✔ Nuxt files generated                                                                                                                                                                                 21:04:03

● Client █████████████████████████ compiling (0%)


◯ Server


node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:140:10)
    at module.exports (/home/napulen/vimu/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/napulen/vimu/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/napulen/vimu/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/napulen/vimu/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/napulen/vimu/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/napulen/vimu/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/napulen/vimu/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/napulen/vimu/node_modules/webpack/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/napulen/vimu/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/napulen/vimu/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/napulen/vimu/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v19.6.0

I came across this solution which fixed it

export NODE_OPTIONS=--openssl-legacy-provider
> vimu@1.0.0 dev
> nuxt

ℹ Parsed 23 files in 0.6 seconds                                                                                                                                                         @nuxt/content 21:04:49

   ╭────────────────────────────────────────────╮
   │                                            │
   │   Nuxt @ v2.15.8                           │
   │                                            │
   │   ▸ Environment: development               │
   │   ▸ Rendering:   server-side               │
   │   ▸ Target:      server                    │
   │                                            │
   │   Listening: http://0.0.0.0:3000/   │
   │                                            │
   ╰────────────────────────────────────────────╯

ℹ Preparing project for development                                                                                                                                                                    21:04:50
ℹ Initial build may take a while                                                                                                                                                                       21:04:50
ℹ Discovered Components: .nuxt/components/readme.md                                                                                                                                                    21:04:50
✔ Builder initialized                                                                                                                                                                                  21:04:50
✔ Nuxt files generated                                                                                                                                                                                 21:04:50

✔ Client
  Compiled successfully in 44.34s

✔ Server
  Compiled successfully in 42.35s

ℹ Waiting for file changes                                                                                                                                                                             21:05:35
ℹ Memory usage: 1.34 GB (RSS: 1.66 GB)                                                                                                                                                                 21:05:35
ℹ Listening on: http://0.0.0.0:3000/

Might be worth writing a note in the README about it. This was a fresh node v19.6 install over WSL Ubuntu.

@iitrabhi
Copy link

Thanks for the solution @napulen. The server is working successfully. Do you know how to bypass the login window?

@Flomp
Copy link
Owner

Flomp commented Apr 28, 2024

Developer here. There is currently no option to bypass the login. When your pocketbase instance is up and running you should be able to make an account very easily though. For more info on self-hosting please check the documentation.

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

3 participants