0

I have been following this tutorial to develop and build a nodejs application. When I use the command to build the package.json file, missing script: build error was coming. A possible solution to this is manually edit the "build" key:value pair in the package.json file, but I have no idea what to add in value part of it for building the webapp. Currently my package.json contains:
{ "name": "my-react-app", "version": "0.1.0", "private": true, "scripts": { "build": "echo 'build script executed'" } } After it, a folder named build should be there but it is not happening where all the html, css and js files will go. All of the packages are upto date. Running windows 10.

1 Answer 1

2

I also follow the tutorial you metioned. I can build the webapp correclty on my side. The build script: react-scripts build. For more detail information about Package.json please refer to my package.json.

My Package.json

{
  "name": "my-react-appp",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.4.2",
    "react-dom": "^16.4.2",
    "react-scripts": "1.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

If you haven't installed the Azure App Serviceextension , then you need to install it from Visual Studio code Marketplace. After that you could publish it to Azure webApp directly with VS code.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.