When I install Vuetable. ( npm install vuetable-2#next --save ) I get the following error:
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! x\AppData\Roaming\npm-cache\_logs\2021-08-23T08_51_20_971Z-debug.log
PS x\Desktop\dd\frontend> npm start serve
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! x\AppData\Roaming\npm-cache\_logs\2021-08-23T08_52_32_164Z-debug.log
I tried to remove the node_modules folder and install it again. Also I tried, npm clean cache --force but still get the same error. How can I fix it?
This is my package.json file :
{
"name": "architectui-vue-pro",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"#ckeditor/ckeditor5-build-classic": "^11.2.0",
"#ckeditor/ckeditor5-vue": "^1.0.1",
"#fancyapps/fancybox": "^3.5.7",
"#fortawesome/fontawesome-svg-core": "^1.2.17",
"#fortawesome/free-solid-svg-icons": "^5.8.1",
"#fortawesome/vue-fontawesome": "^0.1.6",
"animate-sass": "^0.8.2",
"apexcharts": "^3.6.7",
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.0.0-rc.18",
"chart.js": "^2.8.0",
"countup.js": "^1.9.3",
"css-file-icons": "0.0.7",
"es6-promise": "^4.2.6",
"increase-memory-limit": "^1.0.6",
"leaflet": "^1.4.0",
"linearicons": "^1.0.1",
"material-design-icons-iconfont": "^4.0.5",
"mockjs": "^1.0.1-beta3",
"moment": "^2.24.0",
"moment-timezone": "^0.5.31",
"node-sass": "^4.11.0",
"pdfjs": "^2.3.8",
"pe7-icon": "^1.0.4",
"perfect-scrollbar": "^1.4.0",
"popper.js": "^1.15.0",
"quill": "^1.3.6",
"sass-loader": "^7.1.0",
"sweetalert": "^2.1.2",
"toastr": "^2.1.4",
"v-mask": "^1.3.3",
"vee-validate": "^2.2.3",
"vue": "^2.6.10",
"vue-apexcharts": "^1.3.4",
"vue-chartjs": "^3.4.2",
"vue-clipboards": "^1.2.4",
"vue-color": "^2.7.0",
"vue-country-flag": "^1.1.0",
"vue-countup-v2": "^2.0.0",
"vue-cropperjs": "^3.0.0",
"vue-element-loading": "^1.1.1",
"vue-fancybox": "^1.0.3",
"vue-form-wizard": "^0.8.4",
"vue-full-calendar": "^2.7.0",
"vue-js-toggle-button": "^1.3.2",
"vue-ladda": "0.0.15",
"vue-multiselect": "^2.1.4",
"vue-notifications": "^0.9.0",
"vue-pdf": "^4.0.8",
"vue-perfect-scrollbar": "^0.1.0",
"vue-quill-editor": "^3.0.6",
"vue-rate": "^2.2.0",
"vue-router": "^3.0.5",
"vue-select": "^2.6.4",
"vue-session": "^1.0.0",
"vue-sidebar-menu": "^3.7.0",
"vue-slick": "^1.1.15",
"vue-slider-component": "^2.8.16",
"vue-sparklines": "^0.1.9",
"vue-spinkit": "^1.7.12",
"vue-spinner": "^1.0.4",
"vue-sticky-directive": "0.0.8",
"vue-tabs-with-active-line": "^1.1.4",
"vue-textarea-autosize": "^1.0.4",
"vue-toastr": "^2.0.16",
"vue2-animate": "^2.1.0",
"vue2-circle-progress": "^1.2.3",
"vue2-datepicker": "^2.11.0",
"vue2-dropzone": "^3.5.8",
"vue2-google-maps": "^0.10.6",
"vue2-leaflet": "^1.2.3",
"vuelidate": "^0.7.4",
"vuetable-2": "^2.0.0-beta.4",
"vuetify": "^1.5.5",
"vuetrend": "^0.3.2",
"vuex": "^3.1.0"
},
"devDependencies": {
"#vue/cli-plugin-babel": "^3.6.0",
"#vue/cli-plugin-eslint": "^3.6.0",
"#vue/cli-service": "^3.6.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"vue-cli-plugin-vuetify": "^0.5.0",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.0.5"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
You are missing the start script. Add this to your package.json
"scripts": {
"start": "vue-cli-service start",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
Related
I've got a bunch of errors after the update from Vue 2.6(2.6.11) to Vue 2.7 (2.7.13):
Error in
./src/views/pages/SupportPage.vue?vue&type=style&index=0&id=43fb95c5&lang=scss&scoped=true&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
╷ 1 │ #import "#/assets/styles/variables.scss";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
[path to the project]\src\views\pages\SupportPage.vue 1:9 root stylesheet
Folders structure:
tests/unit/setup.js:
import '#/components/global-components'
import sinon from 'sinon'
import localStorage from './test-helpers/local-storage'
global.sinon = sinon
global.localStorage = localStorage
window.HTMLElement.prototype.scrollIntoView = () => {}
window.matchMedia = window.matchMedia || function matchMedia () {
return {
matches: false,
addListener () {},
removeListener () {}
}
}
Pre-Processor Loader in vue.config.js:
css: {
loaderOptions: {
sass: {
prependData: '#import "#/assets/styles/variables.scss";'
}
}
}
package.json:
{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit --include tests/unit/setup.js --timeout 5000",
"lint": "vue-cli-service lint --no-fix",
"deploy": "vue-cli-service s3-deploy",
"lint:fix": "vue-cli-service lint --fix",
"test": "yarn test:unit",
"cy:open": "cypress open",
"cy:run": "cypress run",
"cy:test": "start-server-and-test serve http://localhost:8080 'yarn cy:run --record --headless --browser chrome'",
"recache": "node ./public/scripts/recache.js"
},
"dependencies": {
"#appsignal/javascript": "^1.0.0",
"#appsignal/vue": "^1.0.0",
"#contentful/rich-text-from-markdown": "^13.4.0",
"#contentful/rich-text-html-renderer": "^13.0.0",
"#contentful/rich-text-types": "^15.7.0",
"#popperjs/core": "^2.4.0",
"actioncable": "^5.2.2",
"apollo-cache-inmemory": "^1.6.6",
"apollo-client": "^2.6.10",
"apollo-link": "^1.2.14",
"apollo-link-error": "^1.1.13",
"apollo-link-http": "^1.5.17",
"apollo-utilities": "^1.3.4",
"axios": "^0.18.0",
"body-scroll-lock": "^3.1.3",
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.22.0",
"contentful": "^7.3.0",
"contentful-rich-text-vue-renderer": "^2.1.0",
"core-js": "^3.6.4",
"countries-list": "^2.4.2",
"graphql": "^15.0.0",
"graphql-ruby-client": "1.7.4",
"graphql-tag": "^2.9.2",
"gsap": "./gsap-bonus.tgz",
"jquery": "^3.3.1",
"logrocket": "^2.1.3",
"mobile-detect": "^1.4.4",
"moment": "^2.22.2",
"moment-timezone": "^0.5.33",
"node-sass": "^4.9.3",
"paymentiq-cashier-bootstrapper": "^1.3.2",
"qrcode": "^1.3.4",
"smoothscroll-polyfill": "^0.4.4",
"sourcebuster": "^1.1.0",
"style-loader": "^0.23.1",
"text-mask-addons": "^3.8.0",
"throttle-debounce": "^3.0.1",
"unfetch": "^3.1.1",
"vue": "^2.7.13",
"vue-apollo": "^3.0.0-beta.19",
"vue-clipboard2": "^0.3.0",
"vue-i18n": "^8.10.0",
"vue-lazyload": "^1.3.3",
"vue-meta": "^2.0.4",
"vue-mq": "^1.0.1",
"vue-observe-visibility": "^0.4.6",
"vue-radial-progress": "^0.3.2",
"vue-recaptcha": "^1.1.1",
"vue-router": "^3.0.1",
"vue-text-mask": "^6.1.2",
"vue-visibility-change": "^1.2.1",
"vuejs-datepicker": "^1.6.2",
"vuejs-logger": "^1.5.3",
"vuelidate": "^0.7.5",
"vuex": "^3.0.1"
},
"devDependencies": {
"#babel/plugin-syntax-optional-chaining": "^7.8.3",
"#vue/cli": "^4.5.19",
"#vue/cli-plugin-babel": "^4.5.19",
"#vue/cli-plugin-eslint": "^4.5.19",
"#vue/cli-plugin-unit-mocha": "^4.5.19",
"#vue/cli-service": "^4.5.19",
"#vue/eslint-config-airbnb": "^5.0.2",
"#vue/test-utils": "^1.0.3",
"babel-eslint": "^10.1.0",
"chai": "^4.1.2",
"compression-webpack-plugin": "^3.0.0",
"cypress": "^5.0.0",
"eslint": "7.2.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-loader": "^2.1.0",
"eslint-plugin-cypress": "^2.11.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-vue": "^9.7.0",
"html-webpack-plugin": "^4.3.0",
"moment-locales-webpack-plugin": "^1.2.0",
"preload-webpack-plugin": "^3.0.0-beta.4",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"sinon": "^6.1.4",
"sinon-chai": "^3.2.0",
"standard": "^12.0.1",
"start-server-and-test": "^1.11.3",
"vue-cli-plugin-s3-deploy": "~4.0.0-rc3",
"vue-template-compiler": "^2.7.14",
"webfonts-loader": "^7.0.0",
"webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"resolutions": {
"#babel/parser": "7.20.2"
}
}
Changes after the update (package.json):
I am working on project upgrade from Vue 2 to Vue 3. The code base changed according to Vue migration documents: https://v3-migration.vuejs.org/breaking-changes/introduction.html#overview. I have mismatch of above mentioned libraries. Does somebody has a running project and would share their working library versions
Current mismatch error is :
TypeError: Cannot read property 'NormalModule' of undefined
at VueLoaderPlugin.apply (C:[credentials]\app\node_modules\vue-loader-v16\dist\pluginWebpack5.js:44:47)
at webpack (C:[credentials]app\node_modules\#vue\cli-service\node_modules\webpack\lib\webpack.js:51:13)
at serve (C:[credentials]app\node_modules\#vue\cli-service\lib\commands\serve.js:163:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Package.json:
"scripts": {
"serve": "vue-cli-service serve",
"build": "npm run build:dashboard",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"build-storybook": "build-storybook",
"build:dashboard": "vue-cli-service build --dest $npm_package_config_dashboard src/main.ts",
"compile-typescript": "tsc",
"start": "node app.js",
"storybook": "start-storybook -p 6006",
"watch:tsc": "npx tsc --watch"
},
"dependencies": {
"#juggle/resize-observer": "^3.2.0",
"#popperjs/core": "2.4.4",
"#sentry/browser": "^5.28.0",
"#sentry/integrations": "^5.28.0",
"#sentry/tracing": "^5.28.0",
"#stripe/stripe-js": "^1.9.0",
"#types/lodash": "^4.14.161",
"#types/lodash-es": "^4.17.3",
"#vue/cli-service-global": "^4.5.15",
"bootstrap": "^4.6.1",
"chart.js": "3.0.0-beta.6",
"core-js": "^3.6.5",
"dayjs": "^1.8.36",
"jquery": "^3.5.1",
"lodash-es": "4.17.15",
"nouislider": "14.6.2",
"odometer": "0.4.8",
"patternomaly": "^1.3.2",
"posthog-js": "^1.7.0",
"register-service-worker": "^1.7.1",
"tippy.js": "^6.2.6",
"vue": "^3.2.20",
"vue-class-component": "^8.0.0-rc.1",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-router": "^4.0.0-alpha.6",
"vue-shepherd": "0.2.1",
"vuetify": "^3.0.0-alpha.12",
"vuex": "^4.0.0-alpha.1",
"vuex-persist": "^2.3.0"
},
"devDependencies": {
"#storybook/addon-actions": "^6.2.9",
"#storybook/addon-essentials": "^6.2.9",
"#storybook/addon-knobs": "^6.2.9",
"#storybook/addon-links": "^6.2.9",
"#storybook/vue": "^6.2.9",
"#types/jest": "^26.0.23",
"#types/jquery": "^3.5.5",
"#types/node": "^12.12.62",
"#types/nouislider": "^9.0.5",
"#types/wnumb": "^1.2.0",
"#typescript-eslint/eslint-plugin": "^3.10.1",
"#typescript-eslint/parser": "^3.10.1",
"#vue/cli": "^4.5.13",
"#vue/cli-plugin-babel": "^4.5.12",
"#vue/cli-plugin-eslint": "^4.5.12",
"#vue/cli-plugin-pwa": "^4.5.12",
"#vue/cli-plugin-router": "^4.5.12",
"#vue/cli-plugin-typescript": "^4.5.12",
"#vue/cli-plugin-unit-jest": "^4.5.12",
"#vue/cli-plugin-vuex": "^4.5.15",
"#vue/cli-service": "^4.5.13",
"#vue/compiler-sfc": "^3.2.27",
"#vue/eslint-config-prettier": "^6.0.0",
"#vue/eslint-config-typescript": "^5.1.0",
"#vue/test-utils": "^2.0.0-alpha.1",
"css-loader": "^4.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-vue": "^7.0.0-alpha.0",
"eslint-watch": "^7.0.0",
"faker": "^5.1.0",
"fibers": "^5.0.0",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.4.0",
"node-sass": "^5.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"prettier-eslint": "^11.0.0",
"react-is": "^16.13.1",
"sass": "^1.48.0",
"sass-loader": "^10.2.0",
"style-loader": "^1.2.1",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.18.0",
"ts-jest": "^26.3.0",
"typescript": "^4.4.4",
"vue-cli-plugin-sass-resources-loader": "^1.0.0",
"vue-cli-plugin-vue-next": "~0.1.4",
"vue-cli-plugin-webpack-bundle-analyzer": "^2.0.0",
"vue-eslint-parser": "^7.1.0",
"vue-loader": "^15.9.1",
"vue-style-loader": "^4.1.3",
"watch": "^1.0.2",
"wnumb": "^1.2.0",
"babel-eslint": "^10.1.0"
},
"config": {
"dashboardprod": "../../wwwroot/dashboard",
"dashboard": "./dist"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,vue,ts,tsx}": [
"vue-cli-service lint",
"git add"
],
"*.{scss,vue}": "stylelint"
}
}
Any and all advises are appreciated
My colleague solved it by moving to Vite. My suggestion would be to drop webpack and use Vite instead.
Migration guide for Vue 2 to 3 here: https://v3-migration.vuejs.org/
Vuetify migration guide: https://next.vuetifyjs.com/en/getting-started/upgrade-guide
ERROR: Jest: a transform must export a process function. STACK: TypeError: Jest: a transform must export a process function In VUE Project
I am trying to run Unit-test my test is passing but it's failing while collecting coverages. I have added jest-config file and all unit-test related packages. Please help, Did i missed any package here??
Package.json
{
"name": "#ava-t2/questionnaire-ui",
"version": "1.0.0",
"private": false,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:ci": "npm run test:unit --reporters=default --reporters=jest-junit",
"test:e2e": "vue-cli-service test:e2e",
"build:lib": "vue-cli-service build --target lib --name questionnaire-ui src/plugin.ts --mode production",
"pretty-quick": "pretty-quick",
"serve:standalone": "vue-cli-service serve --mode standalone"
},
"main": "dist/questionnaire-ui.umd.js",
"browser": "dist/questionnaire-ui.common.js",
"unpkg": "dist/questionnaire-ui.umd.min.js",
"dependencies": {
"#ava-ui/tailwind-plugin": "^1.1.3",
"#azure/abort-controller": "^1.0.1",
"#azure/storage-blob": "^12.2.0-preview.1",
"#babel/core": "^7.12.10",
"#popperjs/core": "^2.5.4",
"#types/jest": "^24.9.1",
"#types/jspdf": "^1.3.3",
"#vue/cli-plugin-unit-jest": "^4.5.13",
"apisauce": "^2.0.1",
"autoprefixer": "^9.8.6",
"axios": "^0.21.1",
"axios-retry": "^3.1.9",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^27.0.6",
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.5.0",
"core-js": "^3.6.4",
"file-saver": "^2.0.5",
"html2pdf.js": "^0.9.2",
"jest-junit": "^12.2.0",
"jspdf": "^2.3.1",
"lodash": "^4.17.21",
"marked": "^2.0.1",
"node-sass": "^5.0.0",
"postcss": "^7.0.35",
"postcss-prefix-selector": "^1.7.2",
"postcss-preset-env": "^6.7.0",
"sass-loader": "^10.1.0",
"single-spa-vue": "^2.1.0",
"ts-jest": "^26.5.0",
"v-click-outside": "^3.1.2",
"vee-validate": "^3.4.5",
"vue": "^2.6.11",
"vue-class-component": "^7.2.3",
"vue-html-secure": "^1.0.9",
"vue-loader": "^15.9.6",
"vue-property-decorator": "^8.4.1",
"vue-svg-loader": "^0.16.0",
"vuex": "^3.1.3",
"vuex-class": "^0.3.2"
},
"devDependencies": {
"#types/lodash": "^4.14.168",
"#types/marked": "^1.2.1",
"#vue/cli-plugin-babel": "^4.5.0",
"#vue/cli-plugin-router": "~4.3.0",
"#vue/cli-plugin-typescript": "^4.5.0",
"#vue/cli-plugin-vuex": "~4.3.0",
"#vue/cli-service": "^4.5.0",
"#vue/test-utils": "^1.0.3",
"husky": "^4.2.5",
"postcss-prefix-selector": "^1.7.2",
"postcss-preset-env": "^6.7.0",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"single-spa": "^5.8.2",
"svg-url-loader": "^6.0.0",
"systemjs-webpack-interop": "^2.3.3",
"tailwindcss": "npm:#tailwindcss/postcss7-compat#^2.0.2",
"tslint": "^6.1.2",
"typescript": "^3.9.3",
"vue": "^2.6.12",
"vue-cli-plugin-single-spa": "^2.1.0",
"vue-router": "^3.4.9",
"vue-template-compiler": "^2.6.12"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged tslint . --fix"
}
},
"jest-junit": {
"suiteNameTemplate": "{filepath}",
"outputDirectory": ".",
"outputName": "junit.xml"
}
}
Jest-config file
module.exports = {
preset: "#vue/cli-plugin-unit-jest/presets/typescript-and-babel",
moduleFileExtensions: ["js", "ts", "json", "vue"],
modulePaths: ["./src"],
transform: {
".*\\.(vue)$": "vue-jest",
"^.+\\.tsx?$": "#vue/cli-plugin-unit-jest/node_modules/ts-jest",
"^.+\\.svg$": "<rootDir>/src/svgTransform.js",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
},
collectCoverage: true,
collectCoverageFrom: [
"**/*.{ts,vue}",
"**/*.{js,jsx}",
"!**/node_modules/**",
"!**/coverage/**",
"!**/index.js"
],
coverageReporters: ["text", "cobertura"],
reporters: ["default", "jest-junit"]
};
According to this discussion, you need jest and ts-jest to be the same versions.
I am trying to use HAML inside the .vuefile in the vue version 3 but it is not working.
What I did.
Intall vue cli version 3.0.0-rc.3
Created a new project with:
My package is:
{
"name": "project 3",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"haml": "^0.4.3",
"haml-haml-loader": "^1.0.1",
"hamljs": "^0.6.2",
"register-service-worker": "^1.0.0",
"vue": "^2.5.16",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
},
"devDependencies": {
"#vue/cli-plugin-babel": "^3.0.0-beta.15",
"#vue/cli-plugin-eslint": "^3.0.0-beta.15",
"#vue/cli-plugin-pwa": "^3.0.0-beta.15",
"#vue/cli-plugin-unit-mocha": "^3.0.0-beta.15",
"#vue/cli-service": "^3.0.0-beta.15",
"#vue/test-utils": "^1.0.0-beta.16",
"chai": "^4.1.2",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"vue-template-compiler": "^2.5.16"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
In the old vue cli version 2 with pwa template it worked fine, my package.json for the one that works:
{
"name": "project",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Ruan Carlos <ruanltbg#gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js",
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
"e2e": "node test/e2e/runner.js",
"test": "npm run unit && npm run e2e",
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs"
},
"dependencies": {
"haml": "^0.4.3",
"haml-haml-loader": "^1.0.1",
"hamljs": "^0.6.2",
"vue": "^2.5.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
"autoprefixer": "^7.1.5",
"babel-core": "^6.26.0",
"sw-precache-webpack-plugin": "^0.11.4",
"babel-eslint": "^8.0.1",
"babel-loader": "^7.1.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-2": "^6.24.1",
"babel-register": "^6.26.0",
"chalk": "^2.1.0",
"connect-history-api-fallback": "^1.4.0",
"copy-webpack-plugin": "^4.1.1",
"css-loader": "^0.28.7",
"cssnano": "^3.10.0",
"eslint": "^4.9.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-html": "^3.2.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-config-airbnb-base": "^11.1.3",
"eslint-import-resolver-webpack": "^0.8.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.16.2",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.5",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"http-proxy-middleware": "^0.17.4",
"webpack-bundle-analyzer": "^2.9.0",
"cross-env": "^5.0.5",
"karma": "^1.7.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-phantomjs-shim": "^1.5.0",
"karma-sinon-chai": "^1.3.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.5",
"mocha": "^4.0.1",
"chai": "^4.1.2",
"sinon": "^4.0.1",
"sinon-chai": "^2.14.0",
"inject-loader": "^3.0.1",
"babel-plugin-istanbul": "^4.1.5",
"phantomjs-prebuilt": "^2.1.15",
"chromedriver": "^2.33.1",
"cross-spawn": "^5.1.0",
"nightwatch": "^0.9.16",
"selenium-server": "^3.6.0",
"semver": "^5.4.1",
"shelljs": "^0.7.8",
"opn": "^5.1.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.3.0",
"rimraf": "^2.6.2",
"url-loader": "^0.6.2",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.3",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.7.1",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.19.1",
"webpack-merge": "^4.1.0",
"uglify-es": "^3.1.3"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Does anybody has any clue?
When I run ng build && node server.js from the same directory, everything is ok.
When I run npm build this is my result:
C:\Users\Admin\Desktop\mean-darts-app>npm build
C:\Users\Admin\Desktop\mean-darts-app>
{
"name": "dart-app",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"build": "ng build && node server.js",
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"#angular/common": "^2.3.1",
"#angular/compiler": "^2.3.1",
"#angular/core": "^2.3.1",
"#angular/forms": "^2.3.1",
"#angular/http": "^2.3.1",
"#angular/platform-browser": "^2.3.1",
"#angular/platform-browser-dynamic": "^2.3.1",
"#angular/router": "^3.3.1",
"axios": "^0.16.2",
"body-parser": "^1.17.2",
"core-js": "^2.4.1",
"express": "^4.15.3",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"#angular/compiler-cli": "^2.3.1",
"#types/jasmine": "2.5.38",
"#types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.28.3",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
}
For custom scripts you need to use:
npm run script_name
or
npm run-script script_name
Look into your server.js file, do you have a server.listen statement on it? No output only means "I've finished executing this program with no errors".