npm ERR! Missing script, but the script is there when I run npm run?
For anyone who may find this useful:
I managed to solve it by putting node
before listing the path to my script file, like so:"buildSwaggerFiles": "node projects/common/src/lib/buildSwaggerFiles.bat",
React: missing script: start
I can see you do have "start" script in your package.json
"scripts": {
"start": "react-scripts start", <--- here
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
react-scripts
is a set of scripts from the create-react-app starter pack.
You need to run npm start
command in your terminal in order to run the app.
In common apps, the start script looks like so:
"start": "npx node index.js"
Where index.js can be also the server.js file
npm start - npm ERR! missing script: start
You are missing the entry start
in the scripts
section of your package.json
. If you want to compile the file using npm start
then, you should copy node-sass sass/main.scss css/style.css -w
and paste it as a value for start
. You can add any command you would like to execute as the value for start.
Having said that, if you do npm "compile:sass"
it will compile your sass files if you don't want to change your package.json
.
"scripts": {
...
"compile:sass": "node-sass sass/main.scss css/style.css -w",
"start": "node-sass sass/main.scss css/style.css -w"
},
Related Topics
Referencing "This" Inside Setinterval/Settimeout Within Object Prototype Methods
What Is Returned from a Constructor
How to Execute Promises Sequentially, Passing the Parameters from an Array
Caching a Promise Object in Angularjs Service
Recursive Matching with Regular Expressions in JavaScript
Variable Scope in D3 JavaScript
Chrome Extension - Sendresponse Not Waiting for Async Function
Why Does This JavaScript Code Print "Undefined" on the Console
Turning Off Eslint Rule for a Specific Line
Print Content of JavaScript Object
What's the Best Way to Break from Nested Loops in JavaScript
Ajax Mailchimp Signup Form Integration
Detecting iOS/Android Operating System
How to Limit Google Autocomplete Results to City and Country Only