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

Nuxt 2 not building for tutorial project #10800

Closed
realhackcraft opened this issue Nov 12, 2022 · 1 comment
Closed

Nuxt 2 not building for tutorial project #10800

realhackcraft opened this issue Nov 12, 2022 · 1 comment

Comments

@realhackcraft
Copy link

realhackcraft commented Nov 12, 2022

I get an error saying digital envelope routines is unsupported when I use the default config and run dev

Versions

  • nuxt: v2.13.0
  • node: v17.1.0

Reproduction

download create-nuxt-app
run npx create-nuxt-app
select settings
Look at files
run npm run dev
get error

Package.json
{ "name": "connect-earl", "version": "1.0.0", "private": true, "scripts": { "dev": "nuxt", "build": "nuxt build", "start": "nuxt start", "generate": "nuxt generate", "lint:prettier": "prettier --check .", "lint": "npm run lint:prettier", "lintfix": "prettier --write --list-different ." }, "dependencies": { "@nuxtjs/axios": "^5.13.6", "core-js": "^3.25.3", "nuxt": "^2.15.8", "vue": "^2.7.10", "vue-server-renderer": "^2.7.10", "vue-template-compiler": "^2.7.10" }, "devDependencies": { "@nuxt/types": "~2.15.0", "@nuxtjs/tailwindcss": "^5.3.3", "eslint-config-prettier": "^8.5.0", "postcss": "^8.4.17", "prettier": "^2.7.1" } }
nuxt.config.js
export default { // Global page headers: https://go.nuxtjs.dev/config-head head: { title: 'Connect Earl', htmlAttrs: { lang: 'en' }, meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: '' }, { name: 'format-detection', content: 'telephone=no' } ], link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }] },

// Global CSS: https://go.nuxtjs.dev/config-css
css: [],

// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],

// Auto import components: https://go.nuxtjs.dev/config-components
components: true,

// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss'
],

// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://go.nuxtjs.dev/axios
'@nuxtjs/axios'
],

// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
// Workaround to avoid enforcing hard-coded localhost:3000: nuxt-community/axios-module#308
baseURL: '/'
},

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {}
}

Error log here

What is Expected?

The program to host a website at localhost:3000

What is actually happening?

The program termination with an error

@realhackcraft
Copy link
Author

I discovered that this is a node problem, just add export NODE_OPTIONS=--openssl-legacy-provider to .zshrc to fix.

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

No branches or pull requests

2 participants