I am facing some errors during refactoring an old project. also, this project is upgraded from laravel 5.8 to 6.0 laravel. but most likely it is failing during npm run prod. I wonder what is happening. just before the upgrade it was fine.
[webpack-cli] Error: Unknown option '--no-progress'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # production: `cross-env NODE_ENV=production node_modules/webpack/bin/w ebpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/w ebpack.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # production script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2021-05-27T12_01_52_782Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # prod: `npm run production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # prod script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2021-05-27T12_01_52_797Z-debug.log
so my package .json will look like this:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"resolutions": {
"minimist": "^1.2.5"
},
"dependencies": {
"#expo/vector-icons": "^10.2.1",
"#fortawesome/fontawesome-svg-core": "^1.2.35",
"#fortawesome/free-solid-svg-icons": "^5.15.3",
"#fortawesome/react-fontawesome": "^0.1.14",
"#material-ui/core": "^4.11.4",
"#material-ui/icons": "^4.11.2",
"#material-ui/lab": "^4.0.0-alpha.58",
"#mdi/font": "^4.9.95",
"#react-pdf/renderer": "^1.6.16",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.3.2",
"#testing-library/user-event": "^7.1.2",
"#trendmicro/react-sidenav": "^0.5.0",
"#vue/cli": "^4.5.13",
"braces": "^2.3.2",
"canvasjs": "^1.8.3",
"core-js": "^2.6.12",
"crypto-js": "^4.0.0",
"express": "^4.17.1",
"firebase": "^8.6.2",
"font-awesome": "^4.7.0",
"fs": "0.0.1-security",
"jquery": "^3.6.0",
"lodash": "^4.17.21",
"material-design-icons-iconfont": "^5.0.1",
"material-ui": "^0.20.2",
"material-ui-icons": "^1.0.0-beta.36",
"material-ui-password-field": "^2.1.2",
"mdbvue": "^6.7.2",
"module": "^1.2.5",
"msg91": "0.0.6",
"node-sass": "^4.14.1",
"pondjs": "^0.9.0",
"pug-plain-loader": "^1.1.0",
"react-circular-progressbar": "^2.0.4",
"react-custom-radio": "^1.0.7",
"react-feather": "^2.0.9",
"react-google-charts": "^3.0.15",
"react-move": "^6.4.0",
"react-native-vector-icons": "^6.7.0",
"react-pdf": "^4.2.0",
"react-progressbar": "^15.4.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"react-signature-canvas": "^1.0.3",
"react-simple-dropdown": "^3.2.3",
"react-timeseries-charts": "^0.16.1",
"react-toastify": "^5.5.0",
"react-vis": "^1.11.7",
"recharts": "^2.0.9",
"styled-components": "^5.3.0",
"vue": "^2.6.12",
"vue-awesome-swiper": "^4.1.1",
"vue-axios": "^2.1.5",
"vue-chartist": "^2.3.1",
"vue-ckeditor2": "^2.1.5",
"vue-click-outside": "^1.1.0",
"vue-custom-scrollbar": "^1.4.0",
"vue-easy-slider": "^5.3.4",
"vue-event-hub": "^1.0.3",
"vue-kanban": "^1.8.0",
"vue-loader": "^16.2.0",
"vue-picture-input": "^2.1.6",
"vue-plyr": "^5.1.3",
"vue-resizable": "^1.3.0",
"vue-router": "^3.5.1",
"vue-smooth-dnd": "^0.8.0",
"vue-split-panel": "^1.0.4",
"vue-template-compiler": "^2.6.12",
"vue-video": "^0.1.7",
"vue2-editor": "^2.10.2",
"vueditor": "^0.3.1",
"vuescroll": "^4.17.3",
"vuetify-media-player": "^0.8.1",
"vuex": "^3.6.2",
"watch": "^1.0.2",
"write-json-file": "^4.3.0"
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.13.0",
"#babel/preset-react": "^7.13.13",
"#fortawesome/fontawesome-free": "^5.15.3",
"#vue/cli-plugin-babel": "^3.11.0",
"#vue/cli-plugin-eslint": "^4.5.13",
"#vue/cli-service": "^4.5.13",
"axios": "^0.21.1",
"babel-eslint": "^10.1.0",
"cross-env": "^5.2.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"laravel-mix": "^6.0.19",
"minimist": "^1.2.5",
"pug": "^3.0.2",
"pug-loader": "^2.4.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"resolve-url-loader": "^4.0.0",
"sass": "^1.34.0",
"sass-loader": "^7.1.0",
"stylus": "^0.54.8",
"stylus-loader": "^3.0.2",
"vue-cli-plugin-vuetify": "^0.6.3",
"vuetify": "^2.5.1",
"vuetify-loader": "^1.7.2",
"webpack": "^5.37.1",
"webpack-cli": "^4.7.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {
"no-mixed-spaces-and-tabs": 0,
"no-irregular-whitespace": 0
},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": []
}
},
"browserslist": [
"> 1%",
"last 2 versions"
],
"description": "## Project setup ``` npm install ```",
"main": "babel.config.js",
"keywords": [],
"author": "",
"license": "ISC"
}
my webpack.mix.js
const mix = require('laravel-mix');
mix.webpackConfig({
module: {
rules: [{
test: /\.pug$/,
oneOf: [{
resourceQuery: /^\?vue/,
use: ['pug-plain-loader']
},
{
use: ['raw-loader', 'pug-plain-loader']
},
{
// Exclude `js` files to keep "css" loader working as it injects
// it's runtime that would otherwise processed through "file" loader.
// Also exclude `html` and `json` extensions so they get processed
// by webpacks internal loaders.
exclude: [/\.js$/, /\.html$/, /\.json$/, /\.ejs$/],
loader: require.resolve('file-loader'),
options: {
name: 'static/media/[name].[hash:8].[ext]',
}
}
]
}]
}
});
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.react('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
thanks in advance
looking for some valuable suggestions
Related
I have a node js project running in node v14.17.2 and it time to upgrade i thought v18.13.0
and im really afraid that something will break on the server once i change the version
to run it localy i needed to change npm istanll to npm install --legacy-peer-deps
and then to do :
npm install node-sass --legacy-peer-deps
npm rebuild node-sass
npm audit fix --legacy-peer-deps
so if ill add these steps my app should be fine? is there any other things i need to do befor upgrading the version?
pre-upgraded pacakge.json:
{
"name": "react-app",
"version": "1.1.8",
"private": true,
"dependencies": {
"#date-io/moment": "1.3.13",
"#material-ui/core": "3.0.2",
"#material-ui/icons": "3.0.1",
"#nivo/core": "^0.73.0",
"#nivo/pie": "^0.73.0",
"auth0-lock": "11.30.2",
"autosuggest-highlight": "3.1.1",
"axios": "0.21.1",
"axios-mock-adapter": "1.19.0",
"chart.js": "^2.7.2",
"classnames": "^2.3.1",
"core-js": "^3.14.0",
"downshift": "6.1.3",
"formsy-react": "2.2.5",
"jodit-react": "^1.1.1",
"jss": "^9.8.7",
"jss-extend": "6.2.0",
"jss-rtl": "^0.3.0",
"jwt-decode": "3.1.2",
"keycode": "2.2.0",
"lodash": "4.17.21",
"material-ui-pickers": "^2.2.4",
"mobile-detect": "1.4.5",
"moment": "^2.29.1",
"node-sass": "^4.14.1",
"path-to-regexp": "6.2.0",
"perfect-scrollbar": "1.4.0",
"postcss": "^8.3.5",
"prismjs": "1.23.0",
"prop-types": "^15.7.2",
"qs": "6.10.1",
"raw-loader": "4.0.2",
"react": "17.0.2",
"react-autosuggest": "10.1.0",
"react-big-calendar": "0.33.5",
"react-chartjs-2": "2.7.4",
"react-cookie": "^4.0.3",
"react-credit-cards": "^0.8.3",
"react-dnd": "14.0.2",
"react-dnd-html5-backend": "14.0.0",
"react-dom": "17.0.2",
"react-facebook-pixel": "^1.0.4",
"react-google-charts": "^3.0.15",
"react-gtm-module": "^2.0.11",
"react-jss": "^8.6.1",
"react-number-format": "4.6.3",
"react-popper": "2.2.5",
"react-redux": "7.2.4",
"react-rnd": "^10.3.7",
"react-router-config": "5.1.1",
"react-router-dom": "4.3.1",
"react-scripts": "^2.1.1",
"react-select": "4.3.1",
"react-signature-canvas": "^1.0.6",
"react-swipeable-views": "0.14.0",
"react-table": "^6.8.6",
"react-text-mask": "5.4.3",
"react-to-print": "^2.14.0",
"redux": "4.1.0",
"redux-thunk": "2.3.0",
"typeface-roboto": "1.1.13",
"velocity-react": "1.4.3",
"yarn": "^1.22.10"
},
"scripts": {
"prebuild": "python ../prebuild.py src/myConstants.js",
"start": "yarn run build-css-helpers && cross-env PORT=3001 react-scripts start",
"build": "yarn run build-css-helpers && cross-env NODE_PATH=src react-scripts --max_old_space_size=4096 build",
"build-css-helpers": "./node_modules/.bin/tailwind build ./src/styles/fuse-helpers.tailwind.css -c ./tailwind.js -o ./src/styles/fuse-helpers.css && postcss --use autoprefixer -o ./src/styles/fuse-helpers.css ./src/styles/fuse-helpers.css",
"test": "cross-env NODE_PATH=src react-scripts test --env=jsdom",
"eject": "cross-env NODE_PATH=src react-scripts eject",
"build-docs": "babel-node src/main/content/components/material-ui/build.js",
"postbuild": "python postbuild.py"
},
"devDependencies": {
"#babel/core": "7.14.6",
"#babel/preset-env": "7.14.5",
"autoprefixer": "9.1.5",
"cross-env": "7.0.3",
"js-beautify": "1.14.0",
"marked": "2.1.1",
"postcss-cli": "8.3.1",
"tailwindcss": "0.6.5"
},
"engines": {
"node": ">=14.17.0",
"npm": ">=6.0.0"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
i know i have pacakges to upgrqade i want to start just with node
I am trying to run npm run dev on one of my projects and getting **Module not found: Error: Can't resolve '../dist/helpers.esm' in node_modules/chart.js/helpers
You can see here => https://i.stack.imgur.com/wZc3o.png
Package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"serve": "php artisan serve",
"clear-cache": "php artisan optimize:clear && composer dump-autoload && composer cc && npm cache clean --force"
},
"devDependencies": {
"axios": "^0.21.1",
"bootstrap": "^4.0.0",
"cross-env": "^5.2.1",
"jquery": "^3.2",
"laravel-mix": "^6.0.43",
"lodash": "^4.17.5",
"popper.js": "^1.12",
"resolve-url-loader": "^5.0.0",
"sass-loader": "^12.6.0",
"vue": "^2.5.7",
"vue-loader": "^15.9.8"
},
"dependencies": {
"chart.js": "^3.8.0",
"chartjs-plugin-datalabels": "^2.0.0",
"css-percentage-circle": "^2.0.1",
"echarts": "^5.3.2",
"jspdf": "^2.3.1",
"jspdf-autotable": "^3.5.15",
"laravel-echo": "^1.11.7",
"moment": "^2.29.1",
"moment-timezone": "^0.5.32",
"node-sass": "^7.0.1",
"npm": "^8.6.0",
"pdf-lib": "^1.17.1",
"percircle": "^1.0.28",
"percircle-vue": "^0.1.2",
"pusher-js": "^7.1.0-beta",
"tinymce": "^5.7.1",
"v-charts": "^1.17.10",
"v-skeletor": "^0.0.4",
"v-slim-dialog": "0.0.10",
"vue-axios": "^2.1.4",
"vue-chartjs": "^4.0.0",
"vue-codemirror": "^4.0.6",
"vue-confirm-dialog": "^1.0.2",
"vue-css-percentage-circle": "^2.0.0",
"vue-js-modal": "^2.0.1",
"vue-month-picker": "^1.5.0",
"vue-multiselect": "^2.1.6",
"vue-router": "^3.4.9",
"vue-step-progress": "^0.3.7",
"vue-tinymce-editor": "^1.6.2",
"vue-toast-notification": "^0.6.2",
"vue2-daterange-picker": "^0.6.8",
"vuedraggable": "^2.24.3",
"vuejs-datepicker": "^1.6.2",
"vuejs-dialog": "^1.4.2",
"vuex-persistedstate": "^3.0.0",
"yan-progress": "^1.0.3"
}
}
Node version install on my system is 18.0.0 and npm is 8.6.0
It was working just fine but now its not
I recently tried to run npm update, but I get this error given below. I tried googling it but didn't find the solution to it. Below is the error which I get in my console.
I later also tried to run npm audit fix but this time got different error
webpack.mix.js
const mix = require('laravel-mix');
require('laravel-mix-modernizr');
mix.setPublicPath('public')
.setResourceRoot('../')
.vue()
.sass('resources/sass/frontend/app.scss', 'css/frontend.css')
.sass('resources/sass/backend/app.scss', 'css/backend.css')
.js('resources/js/frontend/app.js', 'js/frontend.js')
.js([
'resources/js/backend/before.js',
'resources/js/backend/app.js',
'resources/js/backend/after.js'
], 'js/backend.js')
.js('resources/js/global.js', 'js/global.js')
.js('resources/js/Banners/banner.js', 'js/banner.js')
.extract([
// Extract packages from node_modules to vendor.js
'alpinejs',
'jquery',
'bootstrap',
'popper.js',
'axios',
'sweetalert2',
'lodash'
])
.sourceMaps()
.modernizr();
if (mix.inProduction()) {
mix.version();
} else {
// Uses inline source-maps on development
mix.webpackConfig({
devtool: 'inline-source-map'
});
}
Mixin is happening fine but I don't understand why am I getting this error given above. I don't know where I am going wrong here. I also tried to run npm rebuild node-sass and then again tried to run npm update & also npm audit fix, but none worked.
Added
package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"#coreui/coreui": "^2.1.16",
"#fortawesome/fontawesome-free": "^5.15.3",
"#popperjs/core": "^2.0.6",
"#vue/test-utils": "^1.1.2",
"alpinejs": "^3.2.2",
"axios": "^0.21.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.1",
"babel-preset-env": "^1.7.0",
"bootstrap": "^5.1.1",
"cross-env": "^7.0",
"cross-var": "^1.1.0",
"css-loader": "^5.2.7",
"jest": "^26.6.3",
"jquery": "^3.5.1",
"laravel-echo": "^1.10.0",
"laravel-mix": "^6.0.25",
"laravel-mix-modernizr": "^1.0.2",
"livewire-vue": "^0.3.1",
"lodash": "^4.17.21",
"perfect-scrollbar": "^1.5.0",
"popper.js": "^1.16.1",
"pusher-js": "^7.0.3",
"resolve-url-loader": "^3.1.2",
"sass": "^1.32.8",
"sass-loader": "^12.1.0",
"socket.io-client": "^3.1.2",
"sweetalert2": "^11.0.19",
"vue": "^2.6.12",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.46.0",
"webpack-cli": "^4.7.2",
"webpack-modernizr-loader": "^5.0.0"
},
"jest": {
"testURL": "http://localhost",
"roots": [
"<rootDir>/tests/Javascript/"
],
"moduleNameMapper": {
"^#/(.*)$": "<rootDir>/resources/js/$1"
},
"moduleFileExtensions": [
"js",
"vue"
],
"transform": {
"^.+\\.js$": "babel-jest",
".*\\.(vue)$": "vue-jest"
}
},
"dependencies": {
"#babel/polyfill": "^7.12.1",
"#chakra-ui/vue": "^0.6.6",
"acorn": "^8.0.4",
"babel-preset": "^1.1.7",
"bootstrap-icons": "^1.5.0",
"bootstrap-vue": "^2.19.0",
"bufferutil": "^4.0.2",
"canvas": "^2.6.1",
"clipboard": "^2.0.6",
"confetti-js": "^0.0.18",
"copy-webpack-plugin": "^9.0.1",
"core-js": "^3.7.0",
"datetimepicker": "^0.1.39",
"formBuilder": "^3.6.1",
"html2canvas": "^1.0.0-rc.7",
"imagemagick": "^0.1.3",
"intersection-observer": "^0.11.0",
"js-cookie": "^2.2.1",
"lodash.remove": "^4.7.0",
"node-sass": "^6.0.0",
"portal-vue": "^2.1.7",
"puppeteer": "^10.4.0",
"react": "^17.0.1",
"regenerator-runtime": "^0.13.7",
"sweetalert": "^2.1.2",
"utf-8-validate": "^5.0.3",
"vee-validate": "^3.3.0",
"vue-chat-scroll": "^1.4.0",
"vue-loader": "^15.9.6",
"vue-router": "^3.5.1",
"vue-timeago": "^5.1.2",
"webrtc-adapter": "^7.7.0",
"yargs-parser": "^20.2.4"
},
"resolutions": {
"yargs-parser": "^19.0.1"
}
}
Problem
I'm running this pipeline file on Azure but I'm experiencing that a package is not found. I want to run tests using Jest with the command npm test after installing the packages with npm install. Jest is in the devDependencies in the package.json, I and think that's why it's not begin installed on azure.
sh: 1: jest: not found
pipeline.yaml:
parameters:
triggerType: ''
jobs:
- job: RunTests
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool#0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install -registry [[[[https://myregistryurl]]]]
displayName: 'npm install'
- script: npm test
displayName: 'npm test'
package.json
{
"name": "ssu-dashboard-client",
"version": "2.3.1",
"description": "Dashboard for operation planning",
"main": "server.js",
"author": "Olavstoppen",
"repository": {},
"license": "MIT",
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon --watch webpack.config.js --watch server.js",
"dev:inspect": "cross-env NODE_ENV=development nodemon --inspect server.js ",
"build": "cross-env NODE_ENV=production webpack --mode production",
"start": "cross-env NODE_ENV=production node server.js",
"test": "jest"
},
"dependencies": {
"#babel/preset-flow": "^7.12.1",
"applicationinsights-js": "^1.0.20",
"axios": "^0.18.1",
"babel-jest": "^26.6.3",
"babel-preset-jest": "^26.6.2",
"color": "^3.1.1",
"connected-react-router": "^6.4.0",
"d3": "^5.9.2",
"date-fns": "^2.12.0",
"date-fns-tz": "^1.0.10",
"highcharts": "7.1.2",
"highcharts-drilldown": "^0.1.7",
"highcharts-more": "^0.1.7",
"highcharts-react-official": "^2.2.2",
"history": "^4.9.0",
"prop-types": "^15.7.2",
"ramda": "^0.26.1",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-google-charts": "^2.0.29",
"react-highcharts": "^16.0.2",
"react-is": "^16.13.1",
"react-json-tree": "^0.11.2",
"react-measure": "^2.3.0",
"react-redux": "^7.0.3",
"react-router": "^5.0.0",
"react-router-dom": "^5.0.0",
"react-router-hash-link": "^1.2.1",
"react-saga": "^0.2.6",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-saga": "^0.16.2",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"sanitize-html": "^2.1.2",
"styled-components": "^5.2.1",
"styled-system": "^5.1.5",
"tinymce": "^5.4.2"
},
"devDependencies": {
"#babel/core": "^7.4.4",
"#babel/plugin-proposal-class-properties": "^7.12.1",
"#babel/plugin-proposal-decorators": "^7.4.4",
"#babel/plugin-proposal-export-namespace-from": "^7.2.0",
"#babel/plugin-proposal-function-sent": "^7.2.0",
"#babel/plugin-proposal-json-strings": "^7.2.0",
"#babel/plugin-proposal-numeric-separator": "^7.2.0",
"#babel/plugin-proposal-throw-expressions": "^7.2.0",
"#babel/plugin-syntax-dynamic-import": "^7.8.3",
"#babel/plugin-syntax-import-meta": "^7.2.0",
"#babel/plugin-transform-runtime": "^7.4.4",
"#babel/polyfill": "^7.4.4",
"#babel/preset-env": "^7.12.1",
"#babel/preset-react": "^7.12.5",
"#hot-loader/react-dom": "^16.8.6",
"#svgr/webpack": "^4.2.0",
"#testing-library/jest-dom": "^5.11.6",
"#testing-library/react": "^11.1.2",
"adal-node": "^0.1.28",
"applicationinsights": "^1.3.1",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-import": "^1.11.0",
"babel-plugin-styled-components": "^1.10.0",
"body-parser": "^1.19.0",
"connect-logger": "0.0.1",
"cookie-parser": "^1.4.4",
"cookie-session": "^2.0.0-beta.3",
"copy-webpack-plugin": "^4.6.0",
"core-js": "^3.0.1",
"cross-env": "^5.2.0",
"css-loader": "^1.0.1",
"dotenv": "^6.2.0",
"dotenv-webpack": "^1.7.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.6.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-styled-components-config": "^0.0.2",
"express": "^4.16.4",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^2.0.0",
"helmet": "^3.16.0",
"html-webpack-plugin": "^3.0.7",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest-styled-components": "^7.0.3",
"jest-svg-transformer": "^1.0.0",
"node-sass": "^4.13.0",
"nodemon": "^1.19.0",
"postcss-loader": "^3.0.0",
"prettier-eslint": "^8.8.2",
"react-hot-loader": "^4.8.4",
"redux-mock-store": "^1.5.4",
"regenerator-runtime": "^0.13.2",
"sass-loader": "^7.0.3",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.2.3",
"url-loader": "^1.1.2",
"webpack": "^4.39.0",
"webpack-cli": "^3.3.1",
"webpack-dev-server": "^3.3.1",
"webpack-hot-middleware": "^2.24.4",
"webpack-merge": "^4.2.1",
"worker-loader": "^2.0.0"
},
"jest": {
"globals": {
"NODE_ENV": "test"
},
"transform": {
"\\.[jt]sx?$": "babel-jest",
"^.+\\.svg$": "jest-svg-transformer"
},
"verbose": false,
"rootDir": ".",
"collectCoverageFrom": [
"**/*.{js,jsx,ts,tsx}",
"!**/*.d.ts"
],
"moduleFileExtensions": [
"js",
"jsx",
"ts",
"tsx"
],
"moduleNameMapper": {
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
"^components/(.*)$": "<rootDir>/src/components/$1",
"^utils/(.*)$": "<rootDir>/src/utils/$1",
"^locales(.*)$": "<rootDir>/src/locales/$1",
"^assets(.*)$": "<rootDir>/src/assets/$1",
"^styles/(.*)$": "<rootDir>/src/styles/$1"
},
"modulePathIgnorePatterns": [
"./dist"
],
"coverageDirectory": "<rootDir>/tests/coverage/"
}
}
My package.json is at the root of the project.
What I have tried
I tried what was suggested underneath, but now I'm getting
npm install -registry [[[[https://myregistryurl]]]]
========================== Starting Command Output ===========================
##[debug]which 'bash'
##[debug]found: '/bin/bash'
##[debug]which '/bin/bash'
##[debug]found: '/bin/bash'
##[debug]/bin/bash arg: --noprofile
##[debug]/bin/bash arg: --norc
##[debug]/bin/bash arg: /home/vsts/work/_temp/7aa1a129-08a3-43cb-8973-ce9f3c9748c4.sh
##[debug]exec tool: /bin/bash
##[debug]arguments:
##[debug] --noprofile
##[debug] --norc
##[debug] /home/vsts/work/_temp/7aa1a129-08a3-43cb-8973-ce9f3c9748c4.sh
/bin/bash --noprofile --norc /home/vsts/work/_temp/7aa1a129-08a3-43cb-8973-ce9f3c9748c4.sh
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vsts/.npm/_logs/2020-12-01T09_22_16_890Z-debug.log
##[debug]Exit code 1 received from tool '/bin/bash'
Could this be because the vmImages' being created are filling up the azure cache or something?
I tried adding - script: npm cache clean --f but this did not do anything.
Update
It seems like the error is related to the registry, where I get a bunch of 401's
npm http fetch GET 401 ...
npm http fetch GET 401 ...
npm http fetch GET 401 ...
npm http fetch GET 401 ...
npm http fetch GET 401 ...
...
I'm quite 100% sure this is correct. But I'm suspecting the issue from the path execution file between locally vs azure pipeline.
Can you try as following by creating a script test on CI?
package.json
{
"test:ci": "node_modules/.bin/jest"
}
Then you execute this command instead of local one:
- script: npm run test:ci
My bf and I were making a haiku checker during school today. Everything was working fine but when I cloned his repo i'm getting a "npm ERR! missing script: build;" on my windows 10 PC
Any help will be much appreciated and I can provide more info
Additional errors
npm ERR! Haiku#1.0.0 start: `npm run build; webpack-dev-server --open --mode development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Haiku#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Here is my package.json
{
"name": "Haiku",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "karma start karma.conf.js",
"build": "webpack --mode development",
"start": "npm run build; webpack-dev-server --open --mode development",
"lint": "eslint src/*.js --fix"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.3",
"babel-preset-es2015": "^6.24.1",
"clean-webpack-plugin": "^0.1.18",
"css-loader": "^0.28.10",
"eslint": "^4.18.2",
"eslint-loader": "^2.0.0",
"html-webpack-plugin": "^3.0.6",
"jasmine": "^3.1.0",
"jasmine-core": "^2.99.0",
"karma": "^2.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-jquery": "^0.2.2",
"karma-webpack": "^2.0.13",
"style-loader": "^0.20.2",
"uglifyjs-webpack-plugin": "^1.2.2",
"webpack": "^4.0.1",
"webpack-cli": "^2.0.9",
"webpack-dev-server": "^3.1.0"
},
"dependencies": {
"bootstrap": "^4.0.0",
"jquery": "^3.3.1",
"popper.js": "^1.14.1",
"syllable": "^3.0.0"
}
}