LoginSignup
yathwi
@yathwi

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

next.jsのローカルサーバーが起動しません。(javascript-tailwindcssを使用)

解決したいこと

vscode内でnext.js(javascript-tailwindcssを使用)のローカルサーバーを起動させたいのですがエラーが出てできません。
以下の実行はうまくいきました。

npx create-next-app --use-npm
npm i tailwindcss
npx tailwindcss init

チュートリアルでは 次に「npm run app」を実行することで起動しています。
json内のスクリプトに問題があるのでしょうか。

発生している問題・エラー

npm ERR! Missing script: "dev"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

npm ERR! A complete log of this run can be found in:

例)

  npm run dev
    Starts the development server.

  npm run build
    Builds the app for production.

  npm start
    Runs the built app in production mode.

We suggest that you begin by typing:

  cd my-app
  npm run dev

該当するソースコード

javascript


### 自分で試したこと
###package.json内のscriptに問題があるかと思い、触りましたが解消されませんでした。
{
  "name": "my-app",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "next": "12.0.7",
    "react": "17.0.2",
    "react-dom": "17.0.2"
  },
  "devDependencies": {
    "eslint": "8.6.0",
    "eslint-config-next": "12.0.7"
  }
}

0

No Answers yet.

Your answer might help someone💌