未分類

[私的メモ]Nuxt.js テスト

 

 

% yarn create nuxt-app src

url#deprecated
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "create-nuxt-app@5.0.0" with binaries:
      - create-nuxt-app

create-nuxt-app v5.0.0
✨  Generating Nuxt.js project in src
? Project name: nuxt-test
? Programming language: TypeScript
? Package manager: Yarn
? UI framework: (Use arrow keys)
❯ None 
  Ant Design Vue 
  BalmUI 
  Bootstrap Vue 
? UI framework: None
? Template engine: HTML
? Nuxt.js modules: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Linting tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press <space> to select, <a> to toggle all, <i> to invert selection)
? What is your GitHub username? yuu kanehiro
? Version control system: Git



🎉  Successfully created project nuxt-test

  To get started:

        cd src
        yarn dev

  To build & start for production:

        cd src
        yarn build
        yarn start

 

 

エラー


% yarn dev

エラー
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.9.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
kanehiroyuu@MacBook-Pro-2 src % node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 17035.
    at /Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
  code: undefined,
  signal: undefined
}
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

RpcIpcMessagePortClosedError: Cannot send the message - the message port has been closed for the process 17036.
    at /Users/kanehiroyuu/Documents/develop.nosync/eventos_project/nuxt-test/src/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-ipc/RpcIpcMessagePort.js:47:47
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
  code: undefined,
  signal: undefined
}

Node.js v18.9.0

 

環境変数にレガシーを指定して一時的に設定する

% export NODE_OPTIONS=--openssl-legacy-provider
% yarn dev

 

 

http://localhost:3000/

動いた

 

$ npm i redis

 

EC2側 Ubuntu

 

$ sudo apt remove cmdtest
$ sudo apt remove yarn
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ sudo apt-get update && sudo apt-get install yarn
$ sudo apt install npm
$ npm install --save nuxt
$ npm install --save redis
$ sudo yarn dev

 

 

sudo apt-get install php-pear
sudo apt-get install php php-redis

 

 

Amazonおすすめ

iPad 9世代 2021年最新作

iPad 9世代出たから買い替え。安いぞ!🐱 初めてならiPad。Kindleを外で見るならiPad mini。ほとんどの人には通常のiPadをおすすめします><

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)