I am getting the following error when I am try to start my app in windows.
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
[0] ^^^^
[0] ^^^
[0]
[0] SyntaxError: missing ) after argument list
Any explanations or packages that I am missing?
Here is my package.json, please let me know some of the scripts that are mac specific and might lead to the above error, from my analysis it is around server or update:watch
package.json
{
"name": "documentation-playground",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "concurrently --kill-others \"npm run server\" \"npm run update:watch\"",
"server": "node --max_old_space_size=8192 ./node_modules/.bin/ng serve --aot --progress false --proxy-config proxy.config.json --port 8888",
"mock": "node json-server/json-server.js",
"update:watch": "onchange \"json-server/**/*.json\" -i -- npm run mock",
"npm-install": "rimraf ./src/app/core && rimraf ./node_modules/woa-core-ng-module && npm i",
"test": "concurrently --kill-others \"npm run mock\" \"ng test --source-map=false\"",
"start-prod": "concurrently --kill-others \"npm run server-prod\" \"npm run update:watch\"",
"server-prod": "ng serve --configuration=production --progress true --proxy-config proxy.config.json",
"start-demo": "ng serve --configuration=demo",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"lint": "ng lint",
"build:clean": "rimraf ./dist/public",
"prebuild": "npm run build:clean",
"build:aot": "./node_modules/.bin/ng build --aot",
"build": "./node_modules/.bin/ng build --prod --configuration=production --deploy-url=documentation-playground/",
"prebuild:demo": "npm run build:clean",
"build:demo": "./node_modules/.bin/ng build --prod --configuration=demo --deploy-url=documentation-playground/",
"postbuild:demo": "mv ./dist/public/documentation-playground/documentation-playground-index.html ./dist/public/documentation-playground/index.html",
"postbuild": "rimraf ./dist/public/documentation-playground/assets/i18n/en.json"
},
"private": true,
"dependencies": {
"#angular/animations": "^6.1.0",
"#angular/common": "^6.1.0",
"#angular/compiler": "^6.1.0",
"#angular/core": "^6.1.0",
"#angular/forms": "^6.1.0",
"#angular/http": "^6.1.0",
"#angular/platform-browser": "^6.1.0",
"#angular/platform-browser-dynamic": "^6.1.0",
"#angular/router": "^6.1.0",
"core-js": "^2.5.4",
"rxjs": "6.3.3",
"zone.js": "~0.8.26",
"#ngx-translate/core": "10.0.0",
"#ngx-translate/http-loader": "3.0.0",
"classlist.js": "1.1.20150312",
"jsonschema": "1.1.1",
"moment": "^2.18.1",
"ngx-drag-drop": "^1.1.0",
"ngx-perfect-scrollbar": "^7.0.0",
"ngx-responsive": "6.0.0",
"ngx-translate-multi-http-loader": "^2.1.2",
"resize-observer-polyfill": "^1.5.0",
"stacktrace-js": "2.0.0",
"web-animations-js": "^2.3.1",
"cp-cli": "^1.1.0"
},
"devDependencies": {
"#angular-devkit/build-angular": "0.6.7",
"#angular/cli": "~6.1.2",
"fs": "0.0.1-security",
"#angular/compiler-cli": "^6.1.0",
"#angular/language-service": "^6.1.0",
"#types/jasmine": "~2.8.6",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.2",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2",
"onchange": "^3.2.1",
"concurrently": "3.4.0",
"json-server": "0.9.6",
"rimraf": "2.6.2"
}
}
Sometimes minor version changes can break things. There might be some monor version change happened from the time you did npm install on your Mac and by the time you did on Window. So, it is advised to keep the package-lock.json in git and update it whenever you are updating your package.json. Also, not that not all packages are compatible with all the platforms. I am sure you can identify the problem causing node module by the call stack.
Related
I am trying to build my angular application using 'ng build'. It is failing because it is running out of memory to build as I surmise from my research. I have tried several of the solutions out there with no luck. After typing 'ng build' either from VSC terminal or on DOS line, it runs for about 3 minutes during this step:
Generating ES5 bundles for differential loading...
then it fails with this error written to my angular-errors.log file:
[error] Error: Call retries were exceeded
at ChildProcessWorker.initialize (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:193:21)
at ChildProcessWorker.onExit (c:\development\gems\Frontend_Serenity_A9_SLIM\Frontend_Serenity_A9\node_modules\jest-worker\build\workers\ChildProcessWorker.js:263:12)
at ChildProcess.emit (events.js:203:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
I have tried increasing my memory as some articles/stack overflows have indicated. I tried this:
npm install -g increase-memory-limit
and then ran this command at the root of my angular project:
increase-memory-limit
to no avail. Using es5 rather than es2015 is not a solution for our app. Any help or ideas you can offer are GREATLY appreciated. I have been trying everything for a week now and am still stuck. Thanks!
package.json contents:
{
"name": "serenity",
"version": "9.0.0",
"license": "PrimeNG Commercial",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/animations": "9.0.4",
"#angular/cdk": "9.1.0",
"#angular/common": "9.0.4",
"#angular/compiler": "9.0.4",
"#angular/core": "9.0.4",
"#angular/forms": "9.0.4",
"#angular/material": "^9.1.0",
"#angular/platform-browser": "9.0.4",
"#angular/platform-browser-dynamic": "9.0.4",
"#angular/router": "9.0.4",
"#aspnet/signalr": "^1.1.4",
"#fullcalendar/core": "4.0.2",
"#fullcalendar/daygrid": "4.0.1",
"#fullcalendar/interaction": "4.0.2",
"#fullcalendar/timegrid": "4.0.1",
"#handsontable/angular": "^5.1.1",
"#mdi/svg": "^5.3.45",
"#types/leaflet-draw": "^1.0.2",
"#types/plotly.js": "^1.50.12",
"chart.js": "2.7.3",
"d3": "^5.16.0",
"font-awesome": "4.7.0",
"handsontable": "^7.4.2",
"intl": "1.2.5",
"leaflet": "^1.6.0",
"leaflet-draw": "^1.0.4",
"leaflet-sidebar-v2": "^3.2.2",
"leaflet.control.layers.tree": "^1.0.0",
"leaflet.glify": "^3.0.0",
"material-design-icons": "^3.0.1",
"plotly.js-dist": "^1.54.1",
"primeflex": "1.0.0",
"primeng": "9.0.1",
"prismjs": "1.15.0",
"quill": "1.1.8",
"rxjs": "6.5.4",
"three": "^0.117.1",
"web-animations-js": "github:angular/web-animations-js#release_pr208",
"xlsx": "^0.16.2",
"zone.js": "0.10.2"
},
"devDependencies": {
"#angular-devkit/build-angular": "0.900.4",
"#angular/cli": "9.0.4",
"#angular/compiler-cli": "9.0.4",
"#angular/language-service": "9.0.4",
"#types/jasmine": "3.5.7",
"#types/jasminewd2": "2.0.8",
"#types/leaflet": "^1.5.17",
"#types/node": "12.12.29",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.3.0",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.2",
"protractor": "5.4.3",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "3.7.5"
}
}
Note sure if this will help in your case, but have you tried increasing the maximumError in the budgets section under configurations in the angular.json file?
Yes, it was a memory issue and I was having a hard time getting node to change the memory limit before it built my project. I was able to get it to allocate 3 gigs and then it worked fine.
I have a project that is built in angular 5. here is the package.json
{
"name": "ff-client",
"version": "0.2.0",
"license": "",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint --type-check",
"e2e": "ng e2e",
"xprecommit": "ng lint --type-check && ng test --single-run --code-coverage",
"xprepush": "ng build --prod",
"i18n": "ng xi18n --i18n-format xlf --output-path src/locale --locale en --progress",
"i18n-merge": "xliffmerge --profile xliffmerge.json",
"browserstack": "ng e2e --no-serve --config protractor.browserstack.conf.js",
"upgrade": "yarn upgrade-interactive --latest",
"build-en": "ng build --prod --e deploy --output-path=dist/en --i18nFile=src/locale/messages.en.xlf --i18nFormat=xlf --locale=en --base-href /en/",
"build-da": "ng build --prod --e deploy --output-path=dist/da --i18nFile=src/locale/messages.da.xlf --i18nFormat=xlf --locale=da --base-href /da/",
"build-fo": "ng build --prod --e deploy --output-path=dist/fo --i18nFile=src/locale/messages.fo.xlf --i18nFormat=xlf --locale=fo --base-href /fo/",
"build-root": "copy dist\\en\\web.config dist\\ && del dist\\en\\web.config && del dist\\da\\web.config && del dist\\fo\\web.config",
"build-prod": "npm run build-en && npm run build-da && npm run build-fo && npm run build-root"
},
"private": true,
"dependencies": {
"#angular/animations": "5.2.9",
"#angular/cdk": "^5.2.4",
"#angular/common": "5.2.9",
"#angular/compiler": "5.2.9",
"#angular/core": "5.2.9",
"#angular/flex-layout": "^5.0.0-beta.14",
"#angular/forms": "5.2.9",
"#angular/http": "5.2.9",
"#angular/material": "^5.2.4",
"#angular/platform-browser": "5.2.9",
"#angular/platform-browser-dynamic": "5.2.9",
"#angular/router": "5.2.9",
"#angular/service-worker": "5.2.9",
"#aspnet/signalr": "^1.0.0-rc1-update1",
"#auth0/angular-jwt": "^1.0.0-beta.9",
"#ngrx/effects": "^5.1.0",
"#ngrx/router-store": "^5.0.1",
"#ngrx/store": "^5.1.0",
"#ngrx/store-devtools": "^5.1.0",
"angular-in-memory-web-api": "^0.5.2",
"applicationinsights-js": "^1.0.15",
"core-js": "^2.5.3",
"hammerjs": "^2.0.8",
"moment": "^2.20.1",
"ng-recaptcha": "^3.0.3",
"ng2-file-upload": "^1.3.0",
"ngrx-store-logger": "^0.2.0",
"ngx-perfect-scrollbar": "^5.3.5",
"redux-beacon": "^1.2.1",
"rxjs": "^5.5.8",
"zone.js": "^0.8.26"
},
"devDependencies": {
"#angular/cli": "1.7.4",
"#angular/compiler-cli": "5.2.9",
"#angular/language-service": "5.2.9",
"#types/jasmine": "~2.8.6",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~9.4.6",
"chai": "^4.1.2",
"codelyzer": "~4.1.0",
"cucumber": "^4.0.0",
"husky": "^0.14.3",
"jasmine-core": "~2.99.1",
"jasmine-marbles": "^0.2.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.4.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-teamcity-reporter": "^1.0.1",
"ngx-i18nsupport": "^0.12.0",
"protractor": "^5.3.0",
"protractor-cucumber-framework": "^4.2.0",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "2.6.2"
}
}
I have download npm and angular-cli.
after installing these, I did npm install to get the required modules. but when I do "ng serve" it shows an error.
ERROR in
node_modules/#angular/flex-layout/core/typings/observable-media/observa
ble-media.d.ts(1,22): error TS2305: Module
'"D:/Projects/FlexFunding/app-dk/Clie
nt/node_modules/rxjs/Rx"' has no exported member 'Subscribable'.
I know now it is angular 6 and rxjs has updated in this version. but how can I solve this issue without migrating this project from angular version 5 to 6. I just need to build and run the project.
i have tried replace rxjs folder under node modules from a running a project. but no luck.
Edit: I have uninstall current version and downgraded to version angular cli version 1.7.4 but the error is same.
ERROR in
node_modules/#angular/flex-layout/core/typings/observable-media/observa
ble-media.d.ts(1,22): error TS2305: Module
'"D:/Projects/FlexFunding/app-dk/Clie nt/node_modules/rxjs/Rx"' has no
exported member 'Subscribable'.
in package.json one of the dependency is
"#angular/flex-layout": "^5.0.0-beta.14"
for ^ of "^5.0.0-beta.14", npm installs the latest version of flex-layout and in the latest version felx-layout uses RxJS 6. But as the project is an Angular 5 project, it uses previous version of RxJs. So, flex-layout failed to import the required libraries because RxJs 6 is not there.
so, the solution that worked for me is to change package.json
"#angular/flex-layout": "5.0.0-beta.14"
then npm install
Try reinstall your application
npm i
If this doesn't work, try delete node_modules folder and reinstall.
I have the latest node.js 8.x and npm 5.6.0 installed. When trying to do a npm install, I constantly get the following error:
npm ERR! code E404
npm ERR! 404 Not Found: #angular/router#5.2.0
The module that fails is different every time I retry the installation, but most typically it's #angular/forms#5.2.0, #angular/animations#5.2.0 and #angular/platform-browser#5.2.0
I do have a working internet connection
I have run npm config set registry https://registry.npmjs.org/.
I deleted the node_modules folder
I have deleted the cache: npm cache clean --force
An npm search does find the module:
C:\windows\system32>npm search #angular/router
NAME | DESCRIPTION | AUTHOR | DATE | VERSION | KEYWORDS
#angular/router | Angular -
theā¦ | =angular | 2018-04-16 | 5.2.10 | angular router
What else can be wrong?
Here is the package.json for completeness:
{
"name": "App",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --env=scapp",
"build-local": "ng build --env=dev",
"build-nonevis": "ng build --env=nonevis",
"test": "ng test",
"lint": "ng lint",
"lint-fix": "ng lint --fix",
"e2e": "ng e2e"
},
"dependencies": {
"#angular/animations": "5.2.0",
"#angular/common": "^5.2.0",
"#angular/compiler": "^5.2.0",
"#angular/core": "^5.2.0",
"#angular/forms": "5.2.0",
"#angular/http": "5.2.0",
"#angular/platform-browser": "5.2.0",
"#angular/platform-browser-dynamic": "5.2.0",
"#angular/router": "5.2.0",
"#ngx-translate/core": "9.1.1",
"#ngx-translate/http-loader": "2.0.1",
"#types/arcgis-js-api": "^4.4.0",
"#types/node": "9.4.0",
"angular2-esri-loader": "^1.0.0",
"cerialize": "^0.1.18",
"chart.js": "2.7.1",
"core-js": "^2.5.1",
"esri-loader": "^1.1.0",
"fullcalendar": "3.7.0",
"intl": "^1.2.5",
"jquery": "3.2.1",
"moment": "2.18.1",
"nanoscroller": "0.8.7",
"ngx-perfect-scrollbar": "5.3.4",
"primeng": "5.2.0",
"quill": "1.1.8",
"rxjs": "5.5.2",
"web-animations-js": "2.3.1",
"zone.js": "0.8.18"
},
"devDependencies": {
"#angular/cli": "^1.6.5",
"#angular/compiler-cli": "^5.2.0",
"#types/jasmine": "2.5.53",
"#types/jasminewd2": "2.0.2",
"#types/node": "6.0.60",
"codelyzer": "4.0.1",
"jasmine-core": "2.6.4",
"jasmine-spec-reporter": "4.1.1",
"karma": "1.7.1",
"karma-chrome-launcher": "2.1.1",
"karma-cli": "1.0.1",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"karma-coverage-istanbul-reporter": "1.3.0",
"protractor": "5.1.2",
"ts-node": "3.2.0",
"tslint": "5.7.0",
"typescript": "2.4.2"
}
}
The problem was caused by a local file .npmrc which contained the line always-auth = true. Removing this line resolved the issue. I have no idea how a 404 error is related to authentication, but noticed that after I switched to a mirror registry, it suddenly reported E401 instead of E404 like the official registry.
In my case, such issue was resolved by adding #latest to the command.
npm install -g #angular/cli#latest
I am running protractor UI automation project and try to run test with yarn test and received following build error
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime
I am on Windows 10 (64). below are the related entries in package.json
"sass-lint": "^1.10.2",
"sass-loader": "6.0.6",
"sasslint-webpack-plugin": "^1.0.4",
"node-sass": "^4.0.0"
npm - 5.6.0
node - v9.11.1
yarn - 1.5.1
{
"name": "Avatarwebapps",
"version": "3.0.0",
"description": "Avatar Apps",
"private": true,
"author": "Avatar DST",
"sasslintConfig": ".sass-lint.yml",
"contributors": [
"Brian Kinch<brian.finch#Avatar.com.au>"
],
"repository": {
"type": "git",
"url": "https://github.com/Avatartest/Avatar.Digital.Apps.git"
},
"bugs": {
"url": "https://Avatartest.atlassian.net/"
},
"scripts": {
"clean": "rimraf node_modules",
"docs": "typedoc --options typedoc.json src/app/app.component.ts",
"e2e": "protractor protractor.e2e.conf.js --params.environment",
"smoke": "protractor protractor.smoke.conf.js --params.environment",
"css:local:test": "cd backstop/development/maui && backstop test",
"css:local:approve": "cd backstop/development/maui && backstop approve",
"extractCustomer": "node extractCustomer.js",
"lint:ts:fix": "tslint -p tsconfig.json -c tslint.json --fix",
"lint:ts": "tslint -p tsconfig.json -c tslint.json",
"lint:sass": "sass-lint -v",
"lint:cpd": "rimraf reports/cpd && mkdir reports/cpd && jscpd -o reports/cpd/report.json -l 20 --limit 10 > reports/cpd/report.txt",
"postinstall": "yarn webdriver:update && npm rebuild node-sass",
"server": "webpack-dev-server --inline --progress --port 8080",
"start": "webpack-dev-server --config config/webpack/webpack.config.myaccount.js --inline --progress --port 8080 --https --cert ./ssl/server.crt --key ./ssl/server.key",
"start:e2e": "webpack-dev-server --config config/webpack/webpack.config.e2e.js --inline --quiet --https --port 8080",
"build": "rimraf dist/non-prod && webpack --config config/webpack/webpack.config.build.js --progress --profile --bail",
"build:e2e": "rimraf config/dist && webpack --config config/webpack/webpack.config.localhost.js --progress --profile --bail",
"build:prod": "rimraf dist/prod && webpack --config config/webpack/webpack.config.prod.js --progress --profile --bail",
"build:prod:analysis": "rimraf dist/prod && webpack --config config/webpack/webpack.config.prod.analyzer.js --progress --profile --bail",
"build:aot": "rimraf aot/ dist/aot && node --max_old_space_size=6244 ./node_modules/webpack/bin/webpack.js --config webpack.config.aot.js --progress --profile --bail --display-error-details",
"test": "karma start",
"test:debug": "karma start --browsers Chrome",
"test:ci": "karma start --browsers ChromeHeadless",
"test:watch": "karma start --no-single-run --auto-watch",
"test:watch:debug": "karma start --no-single-run --auto-watch --browsers Chrome",
"test:mockserver": "ts-node ./server-ts/tests/runMockserverTests.ts",
"webdriver:start": "webdriver-manager start",
"webdriver:update": "webdriver-manager update --ie",
"webdriver:clean": "webdriver-manager clean",
"build:service:nonprod": "rimraf dist/non-prod && webpack --config config/webpack/webpack.config.build-cache.js --progress --profile --bail",
"build:dev:cache:nonprod": "yarn build:service:nonprod && yarn precache:nonprod && yarn server:nonprod",
"build:cache:nonprod": "yarn build && yarn precache:nonprod",
"build:cache:prod": "yarn build:prod && yarn precache:prod",
"build:cache:aot": "yarn build:aot && yarn precache:aot",
"server:aot": "node tools/simple-server.js",
"server:aot:start:bg": "forever start -t -p . -al server.log tools/simple-server.js -p 8080",
"server:aot:stop:bg": "forever stop tools/simple-server.js -p 8080",
"precache:nonprod": "sw-precache --verbose --config=config/precacheConfig-nonprod.js",
"precache:prod": "sw-precache --verbose --config=config/precacheConfig-prod.js",
"precache:aot": "sw-precache --verbose --config=config/precacheConfig-aot.js",
"mockserver": "ts-node-dev ./server-ts/index.ts",
"mockserver:start:bg": "forever start -t -p . --workingDir . -al stub.log --id mockserver ./node_modules/ts-node/dist/bin.js ./server-ts/index.ts",
"mockserver:stop:bg": "forever stop mockserver",
"reports:plato": "yarn compile:ts && rimraf reports/plato && plato -r -d reports/plato -n -t \"My Account\" srcJs",
"reports:complexity": "yarn compile:ts && rimraf reports/complexity && mkdir reports/complexity && cd srcJs && ../node_modules/jscomplexity/bin/jscomplexity-cli.js > ../reports/complexity/report.txt",
"compile:ts": "rimraf srcJs && tsc -p src/tsc.json --outDir srcJs",
"compile:e2e": "tsc --project e2etsc.json",
"preflight": "yarn && yarn lint:sass && yarn lint:ts && yarn test:mockserver && yarn test:ci && yarn build:aot && yarn precache:aot && echo 'Preflight checks PASSED!' || echo 'Preflight checks FAILED!'"
},
"dependencies": {
"#angular/animations": "^5.2.0",
"#angular/common": "^5.2.0",
"#angular/compiler": "^5.2.0",
"#angular/core": "^5.2.0",
"#angular/forms": "^5.2.0",
"#angular/http": "^5.2.0",
"#angular/material": "^5.2.0",
"#angular/cdk": "^5.2.0",
"#angular/platform-browser": "^5.2.0",
"#angular/platform-browser-dynamic": "^5.2.0",
"#angular/router": "^5.2.0",
"#typed/hashmap": "^1.0.1",
"#types/body-parser": "^1.16.8",
"#types/express-fileupload": "^0.1.1",
"angular-progress-http": "1.0.0",
"angular2-text-mask": "^8.0.1",
"angulartics2": "^2.2.2",
"bootstrap": "3.3.7",
"core-js": "^2.4.1",
"css-element-queries": "^0.4.0",
"hammerjs": "2.0.8",
"jwt-decode": "^2.1.0",
"jwt-simple": "^0.5.1",
"lodash": "^4.17.4",
"moment": "^2.17.1",
"reflect-metadata": "0.1.10",
"rxjs": "5.5.7",
"zone.js": "^0.8.19"
},
"devDependencies": {
"#angular-devkit/core": "0.3.2",
"#angular/cli": "~1.7.3",
"#angular/compiler-cli": "^5.2.0",
"#angular/language-service": "^5.2.0",
"#ngtools/webpack": "1.10.2",
"#octopusdeploy/octopackjs": "0.0.7",
"#types/core-js": "^0.9.40",
"#types/express": "^4.11.0",
"#types/form-data": "0.0.33",
"#types/hammerjs": "^2.0.34",
"#types/jasmine": "~2.8.3",
"#types/jasminewd2": "~2.0.2",
"#types/lodash": "^4.14.66",
"#types/node": "^7.0.5",
"#types/request": "^0.0.44",
"#types/source-map": "^0.5.0",
"#types/uglify-js": "^2.0.27",
"#types/webpack": "~3.8.11",
"adal-node": "^0.1.27",
"angular-router-loader": "^0.8.2",
"angular2-template-loader": "^0.6.0",
"assets-webpack-plugin": "^3.5.1",
"autoprefixer": "^7.2.3",
"azure-keyvault": "^3.0.1-preview",
"backstopjs": "^3.0.36",
"body-parser": "^1.17.2",
"case-sensitive-paths-webpack-plugin": "^2.1.1",
"chai": "^4.0.2",
"circular-dependency-plugin": "^4.2.1",
"codelyzer": "^4.0.1",
"command-line-args": "^4.0.1",
"command-line-usage": "^4.0.0",
"concurrently": "^3.1.0",
"copy-webpack-plugin": "~4.4.1",
"css-loader": "^0.28.4",
"ejs-compiled-loader": "^1.1.0",
"express": "^4.15.3",
"express-fileupload": "^0.1.4",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "^1.1.5",
"forever": "^0.15.3",
"fs": "0.0.2",
"git-rev-2": "^0.1.0",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.29.0",
"http-proxy-middleware": "^0.17.4",
"inversify": "^4.10.0",
"istanbul-instrumenter-loader": "^3.0.0",
"jasmine-bamboo-reporter": "0.0.2",
"jasmine-core": "~2.8.0",
"jasmine-reporters": "^2.2.0",
"jasmine-spec-reporter": "~4.2.1",
"jscomplexity": "^2.0.0",
"jscpd": "^0.6.15",
"json-loader": "^0.5.4",
"jsonfile": "^3.0.0",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage": "^1.1.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-junit-reporter": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-remap-coverage": "^0.1.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "2.0.4",
"mkdirp": "^0.5.1",
"mocha": "^3.1.2",
"mocha-junit-reporter": "^1.12.0",
"node-sass": "^4.0.0",
"ntypescript": "^1.201609302242.1",
"null-loader": "0.1.1",
"octopus-deploy": "^2.0.0",
"open-browser-webpack-plugin": "0.0.3",
"optimize-css-assets-webpack-plugin": "^3.1.1",
"optimize-js-plugin": "^0.0.4",
"plato": "^1.7.0",
"postcss-loader": "^1.0.0",
"protractor": "~5.1.2",
"protractor-browser-logs": "^1.0.351",
"protractor-jasmine2-html-reporter": "0.0.7",
"raw-loader": "0.5.1",
"request": "^2.83.0",
"rimraf": "^2.5.4",
"sass-lint": "^1.10.2",
"sass-loader": "6.0.6",
"sasslint-webpack-plugin": "^1.0.4",
"should": "^11.1.1",
"strip-loader": "^0.1.2",
"style-loader": "^0.19.1",
"sw-precache": "^5.1.1",
"ts-loader": "^2.3.3",
"ts-md5": "^1.2.2",
"ts-mocks": "^0.2.2",
"ts-node": "~4.1.0",
"ts-node-dev": "^1.0.0-pre.16",
"tslib": "^1.5.0",
"tslint": "~5.9.1",
"tslint-eslint-rules": "4.1.1",
"tslint-loader": "3.5.3",
"typedoc": "^0.7.1",
"typescript": "~2.5.3",
"uglifyjs-webpack-plugin": "^1.1.8",
"url-loader": "^0.6.2",
"webpack": "3.11.0",
"webpack-bundle-analyzer": "^2.4.0",
"webpack-dev-server": "~2.11.0",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"zip-dir": "^1.0.2"
}
}
I had same problem but didn't have to downgrade the node version. I just updated the package.json file node-sass entry to match my node version from the table on the github page. https://github.com/sass/node-sass/
I'm using node 14.15.3 so I put "node-sass": "^4.14.0" in dependencies, did another npm install, and it worked.
I am having some trouble with npm install.
npm install package-name is working perfectly, but when I add a new dependency in the package.json file manually (by pulling via git) and then try to npm install only, it returns
up to date in 4.2 sec
And doesn't install the package.
FYI: I am using git to pull the package.json file. So there is no any issue in the package name. It just doesn't work when i pull and try to install it with npm install only.
My package.json is:
{
"name": "ap",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "^4.0.0",
"#angular/compiler": "^4.0.0",
"#angular/core": "^4.0.0",
"#angular/forms": "^4.0.0",
"#angular/http": "^4.0.0",
"#angular/platform-browser": "^4.0.0",
"#angular/platform-browser-dynamic": "^4.0.0",
"#angular/platform-server": "^4.1.3",
"#angular/router": "^4.0.0",
"#ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.26",
"#ngx-translate/core": "^6.0.1",
"#ngx-translate/http-loader": "0.0.3",
"#types/underscore": "^1.8.0",
"angular-datatables": "^4.1.0",
"angular2-busy": "^2.0.4",
"angular2-jwt": "^0.2.3",
"angular2-toaster": "^4.0.0",
"chart.js": "^2.6.0",
"core-js": "^2.4.1",
"datatables.net": "^1.10.15",
"datatables.net-dt": "^1.10.15",
"jquery": "^3.2.1",
"ng2-charts": "^1.5.0",
"ng2-simple-timer": "^1.3.1",
"rxjs": "^5.1.0",
"underscore": "^1.8.3",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#angular/animations": "^4.1.3",
"#angular/cli": "1.0.4",
"#angular/compiler-cli": "^4.0.0",
"#types/datatables.net": "^1.10.1",
"#types/jasmine": "2.5.38",
"#types/jquery": "^2.0.45",
"#types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
As #j7an said, the problem must depend on the environment. I had the same problem and I didn't know how my NODE_ENV was set to production. Anyway, I did this: (as explained in this answer )
Remove package-lock.json
Remove node_modules
After that:
npm install
npm install --only=dev
This must solve the problem.
I experienced this issue when I ran export NODE_ENV=production based on the book "Modern JavaScript". After deleting node_modules, package.json, and also clearing npm cache didn't fix the issue, I found the answer from this stackoverflow entry: npm install won't install devDependencies
To fix the issue, I ran export NODE_ENV= which removed the production flag. Once I did that I was able to install dev dependencies again. Hope this helps.