Building Dynamic React Apps with SQL Server Data

  • Comments posted to this topic are about the item Building Dynamic React Apps with SQL Server Data

  • Hi  My name  is Ron. I have beaten this thing to death. No matter what I do I get npm start is missing when I issue npm start. Please help,
    Thank you

  • Hi Ron,
    Have you installed Node.js? You can download it here: https://nodejs.org/en/ You need the runtime to proceed.

  • I have node install. Npm Init works, NPM Install works, 
    Just when I try NPM start I get the problem.

    I will load the node you are pointing to and see if that works. I am at work I will try tonight.

    Is it possible for to to post the final package.json file so I can see if I got that right?

    Thank you
    Ron

  • Ron,
    Here are the contents of the package.json file

    {
        "name": "apiserver-react",
        "version": "1.0.0",
        "description": "",
        "main": "main.js",
        "scripts": {
            "start": "webpack-dev-server --hot"
        },
        "author": "",
        "license": "ISC",
        "dependencies": {
            "axios": "^0.18.0",
            "babel-core": "^6.26.3",
            "babel-loader": "^7.1.4",
            "babel-preset-es2015": "^6.24.1",
            "babel-preset-react": "^6.24.1",
            "react": "^16.4.1",
            "react-dom": "^16.4.1",
            "webpack": "^4.12.0",
            "webpack-dev-server": "^3.1.4"
        }
    }

    EDIT: "start" not "script"

  • rcronc - Wednesday, June 20, 2018 11:14 AM

    I have node install. Npm Init works, NPM Install works, 
    Just when I try NPM start I get the problem.

    I had this exact same issue this morning. Are you by chance doing this on a Windows machine? I had installed everything on Linux yesterday and npm start worked fine, but after repeating all of the steps on a Windows machine npm start wouldn't do anything.

    After looking around a bit I realized that the current version of NPM bundled with node has this problem on Windows. About halfway down the page on https://github.com/react-community/create-react-native-app/issues/233 brentvatne suggested the solution which finally worked for me (and I realize that the thread I linked to is regarding create-react-native-app, which we aren't using, but it's the same issue).

    If it sounds like the same issue:
    1) Run npm --version to make sure your current version is >=5.
    2) If so run: npm i -g npm@4.6.1
    3) Run npm --version again to make sure you are now using 4.6.1.

    npm start should work fine now.

    Or you could use yarn but where's the fun in that? Hope this helps.

  • where is the source code?

  • Hi Lero, the new SQLServerCentral CSS doesn't surface links very well. There's a link in the opening paragraph to the source code: https://www.sqlservercentral.com/articles/apiserver-react.zip

  • I clicked on it but  the page opens with :

    Oops! That page can’t be found.

    It looks like nothing was found at this location. Try the search below.

  • Hmm, try the original site link: https://www.cdata.com/kb/articles/apiserver-react.zip

  • Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply