I am having problem with dependencies in my Angular 4 project. This is the package.json file:
{
"name": "angular-webpack-starter",
"version": "1.0.0",
"description": "A webpack starter for Angular",
"scripts": {
"start": "webpack-dev-server --hot --inline --progress --port 8080 --open",
"test": "karma start",
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"
},
"dependencies": {
"#angular/animations": "^4.2.5",
"#angular/common": "^4.2.5",
"#angular/compiler": "^4.2.5",
"#angular/compiler-cli": "^4.2.5",
"#angular/core": "^4.2.5",
"#angular/forms": "^4.2.5",
"#angular/http": "^4.2.5",
"#angular/platform-browser": "^4.2.5",
"#angular/platform-browser-dynamic": "^4.2.5",
"#angular/platform-server": "^4.2.5",
"#angular/router": "^4.2.5",
"core-js": "^2.4.1",
"ngx-infinite-scroll": "^0.5.1",
"rxjs": "5.4.1",
"zone.js": "^0.8.12",
"typescript": "^2.4.1"
},
"devDependencies": {
"#angular/cli": "^1.2.0",
"#angular/compiler-cli": "4.2.5",
"#types/core-js": "^0.9.42",
"#types/jasmine": "^2.5.53",
"#types/node": "^8.0.6",
"angular2-template-loader": "^0.6.2",
"awesome-typescript-loader": "^3.2.1",
"css-loader": "^0.28.4",
"file-loader": "^0.11.2",
"html-loader": "^0.4.5",
"html-webpack-plugin": "^2.29.0",
"jasmine": "^2.6.0",
"jasmine-core": "^2.6.4",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-typescript": "^3.0.4",
"karma-webpack": "^2.0.3",
"node-sass": "^4.5.3",
"null-loader": "^0.1.1",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.1",
"sass-loader": "^6.0.6",
"script-loader": "^0.7.0",
"style-loader": "^0.18.2",
"to-string-loader": "^1.1.5",
"typescript": "^2.4.1",
"typings": "^2.1.1",
"url-loader": "^0.5.9",
"webpack": "^3.0.0",
"webpack-dev-server": "^2.2.0",
"webpack-merge": "^4.1.0"
}
}
And upon running npm start I get the following error:
> webpack-dev-server --hot --inline --progress --port 8080 --open
C:\...project_folder...\node_modules\extract-text-webpack-plugin\index.js:187
throw new Error("Breaking change: extract now only takes a single argument. Either an options " +
^
Error: Breaking change: extract now only takes a single argument. Either an options object *or* the loader(s).
Example: if your old code looked like this:
ExtractTextPlugin.extract('style-loader', 'css-loader')
You would change it to:
ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })
The available options are:
use: string | object | loader[]
fallback: string | object | loader[]
publicPath: string
at Function.ExtractTextPlugin.extract (C:\...project_folder...\node_modules\extract-text-webpack-plugin\index.js:187:9)
at Object.<anonymous> (C:\...project_folder...\config\webpack.common.js:35:30)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\...project_folder...\config\webpack.dev.js:3:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! angular-webpack-starter#1.0.0 start: `webpack-dev-server --hot --inline --progress --port 8080 --open`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-webpack-starter#1.0.0 start script 'webpack-dev-server --hot --inline --progress --port 8080 --open'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack-dev-server --hot --inline --progress --port 8080 --open
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-webpack-starter
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\...project_folder...\npm-debug.log
Does anyone know what seems to be the problem? I have tried changing the versions and deleting node_modules folder and running npm install, but the same thing happens each time.
In yourwebpack.config.jsfile
change
ExtractTextPlugin.extract('style-loader', 'css-loader')
to
ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader' })
As, syntax is changed in latest version.
Hope,it will help!
Related
I've tried to unsuccessfully run a node app, which runs fine on both High Sierra and Windows 10, but fails on Mojave 10.14.1.
This is the error shown when running the gulp build_dev task:
[23:44:42] Requiring external module babel-register
fs.js:25
'use strict';
^
ReferenceError: internalBinding is not defined
at fs.js:25:1
at req_ (/Users/user1/Documents/NodeProjects/myapp/node_modules/natives/index.js:137:5)
at Object.req [as require] (/Users/user1/Documents/NodeProjects/myapp/node_modules/natives/index.js:54:10)
at Object.<anonymous> (/Users/user1/Documents/NodeProjects/myapp/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/user1/Documents/NodeProjects/myapp/node_modules/babel-register/lib/node.js:152:7)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp#1.0.0 dev: `node node_modules/gulp/bin/gulp.js build_dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user1/.npm/_logs/2018-11-04T22_44_42_709Z-debug.log
This is the content of the package.json file with all the dependencies used in the application:
{
"name": "myapp",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test-dev": "node node_modules/gulp/bin/gulp.js test_dev",
"test-prod": "node node_modules/gulp/bin/gulp.js test_prod",
"dev": "node node_modules/gulp/bin/gulp.js build_dev",
"prod": "node node_modules/gulp/bin/gulp.js build_prod"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-polyfill": "^6.26.0",
"body-parser": "^1.17.2",
"cookie-parser": "^1.4.3",
"envify": "^4.1.0",
"express": "^4.16.2",
"glob": "^7.1.2",
"http-status-codes": "^1.1.6",
"morgan": "^1.8.2",
"multi-glob": "^1.0.1",
"npm": "^6.4.1",
"path": "^0.12.7"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-core": "^6.26.0",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.0",
"babel-register": "^6.24.1",
"babelify": "^7.3.0",
"browser-sync": "^2.26.3",
"browserify": "^16.1.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.1",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^3.3.0",
"gulp-minify-css": "^1.2.4",
"gulp-nodemon": "^2.2.1",
"gulp-notify": "^3.0.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-sass-glob": "^1.0.8",
"gulp-sourcemaps": "^2.6.0",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.8",
"imagemin-pngquant": "^5.0.1",
"run-sequence": "^2.2.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
}
}
Any hint on how to debug this problem? Could be related to gcc compiler version?
node version: 11.1.0
npm version: 6.4.1
At this link I've uploaded the log of the "npm install" command to install dependencies: npm_install.log
Try updating natives to the latest version. This commit seems to resolve the issue you're having.
I downgraded Node version from 10.15.0(LTS) to 10.10.0. And this fixed internalBinding error for me.
sudo npm cache clean -f
sudo npm install -g n
sudo n 10.10.0
In my case, the issue was with the node_modules installation, so do the following.
Perform a yarn audit
Check if you have any critical vulnerabilities
Either upgrade the version of the module or search for an alternative module.
yarn install
You should be good to go
Note: Issue was not with the node version in my case it was just a vulnerable module(gulp-angular-templatecache). I also suggest you do npm upgrade and npm rebuild if the above method doesn't work.
npm audit doesn't work with private repositories but yarn audit does.
I am getting the below error while trying to run npm start without updating the node version nor the npm version.
ERROR
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Work\node-v6.10.3-win-x64\node-v6.10.3-win-x64\node.exe" "
C:\Work\node-v6.10.3-win-x64\node-v6.10.3-win-x64\node_modules\npm\bin\np
m-cli.js" "start"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ucps-online-client#1.0.0 start: ng serve --proxy-config proxy.conf.jso
n
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ucps-online-client#1.0.0 start script 'ng serve --proxy-c
onfig proxy.conf.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ucps-online-client pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve --proxy-config proxy.conf.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ucps-online-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ucps-online-client
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Work\workspace_Nov9_commit\ucps-online-parent\ucps-online-client
\npm-debug.log
Package.json
{
"name": "ucps-online-client",
"version": "1.0.0",
"private": true,
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"lint": "ng lint"
},
"dependencies": {
"#angular/animations": "^4.0.1",
"#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/router": "^4.0.0",
"bootstrap": "3.3.7",
"core-js": "^2.4.1",
"font-awesome": "4.6.3",
"jquery": "2.2.3",
"latest-version": "^3.1.0",
"moment": "2.17.1",
"ng2-bootstrap": "1.6.3",
"ng2-datepicker": "^1.8.3",
"ng2-datetime-picker": "^0.12.5",
"ng2-pagination": "^2.0.2",
"primeng": "4.1.0",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.8.5"
},
"devDependencies": {
"#angular/compiler-cli": "^4.0.0",
"#types/node": "^7.0.12",
"#angular/cli": "^1.0.0",
"codelyzer": "^2.1.1",
"ts-node": "^3.0.2",
"tslint": "^5.0.0",
"typescript": "^2.2.2"
},
"engines": {
"node": ">= 6.9.1",
"npm": ">= 3"
}
}
So I upgraded to angular 4+ just so that I can leverage the universal package for server side rendering for SEO purposes. I implemented that in my existing angular 2+ project by upgrading it to angular 4+ and did all the necessary configuration from https://github.com/evertonrobertoauler/cli-universal-demo/commit/a2610286bd3db5d4f4cce4318d7c220c11963eb6.
There is only one difference I am using ng-bootstrap https://ng-bootstrap.github.io/#/home (v1.0.0-alpha.22). But when I run the node server using npm run start-u-dev I get this error for import keyword in ng-bootstrap.
app-ui#0.0.0 start-u-dev /Users/giric/Projects/apnaDoctor/webapp/appUI
ts-node src/server.ts
/appUI/node_modules/#ng-bootstrap/ng-bootstrap/accordion/accordion.module.js:1
(function (exports, require, module, __filename, __dirname) { import { NgModule } from '#angular/core';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/appUI/dist/ngfactory/src/app/app.server.module.ngfa
ctory.ts:18:1)
at Module._compile (module.js:571:32)
at Module.m._compile (/appUI/node_modules/ts-node/src/index.ts:406:23)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .ts]
(/webapp/appUI/node_mod
ules/ts-node/src/index.ts:409:12)
at Module.load (module.js:488:32)
pm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start-u-dev"
npm ERR! node v7.7.4
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! app-ui#0.0.0 start-u-dev: `ts-node src/server.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-ui#0.0.0 start-u-dev script 'ts-node src/server.ts'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ts-node src/server.ts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app-ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
This is what my package.json looks like
{
"name": "app-ui",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"prestart": "npm install",
"postinstall": "bower install",
"prestart-u-dev": "npm install && ng build && ngc",
"start-u-dev": "ts-node src/server.ts",
"prestart-u-prod": "npm install && ng build --prod && ngc",
"start-u-prod": "ts-node src/server.ts"
},
"private": true,
"dependencies": {
"#angular/animations": "^4.0.1",
"#angular/cli": "^1.0.0-rc.1",
"#angular/common": "^4.0.1",
"#angular/compiler": "^4.0.1",
"#angular/compiler-cli": "^4.0.1",
"#angular/core": "^4.0.1",
"#angular/forms": "^4.0.1",
"#angular/http": "^4.0.1",
"#angular/platform-browser": "^4.0.1",
"#angular/platform-browser-dynamic": "^4.0.1",
"#angular/platform-server": "^4.0.1",
"#angular/router": "^4.0.1",
"#ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.22",
"angular2-toaster": "^3.0.1",
"core-js": "^2.4.1",
"ng2-webstorage": "^1.5.1",
"rxjs": "^5.1.0",
"rxjs-es": "^5.0.0-beta.12",
"typescript": "^2.2.2",
"ui-router-ng2": "^1.0.0-beta.4",
"zone.js": "^0.7.6"
},
"devDependencies": {
"#types/jasmine": "2.5.38",
"#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.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.5.0",
"protractor": "~5.1.0",
"raw-loader": "^0.5.1",
"sass-loader": "^6.0.3",
"ts-node": "~2.0.0",
"tslint": "~4.4.2"
}
}
Update:
Earlier i removed angular2-toaster, but then i added it again just to make sure it wasn't just toaster module that is throwing the same error. Turns out, both angular2-toaster and ng-bootstrap threw the same error.
Update 2:
When I run the server using ng server, it works fine, no issues with using ng-bootstrap and angular2-toaster with angular 4+
Any suggestions? Thanks in advance.
For those trying to understand what the solution is, you basically want to use and whitelist angular2-toaster and other modules giving this issue.
if using angular-cli, use ng eject to create a webpack.config.js
install the webpack-node-externals dependency via npm install and add the following lines in the webpack.config.js file
const nodeExternals = require('webpack-node-externals');
module.exports = {
...
target: 'node',
externals: [nodeExternals({
whitelist: [
/^#ng-bootstrap\/ng-bootstrap/,
/^angular2\-toaster/,
]
})],
...
}
It is clearly a build issue - you don't seem to have a proper transpilation setup for your server-side code. Please note that ng-bootstrap (as any other Angular 2.x+ library!) is shipping code in the following manner:
unbundled ES2015 code (with imports)
UMD-bundled ES5 code (without imports)
If you want to run ng-bootstrap on the server you've got 2 choices: either setup proper transpilation pipeline and used unbundled code or import from a bundle (located in bundles folder).
If you decide to go with a ES5 bundle approach you should be importing from #ng-bootstrap/ng-bootstrap/dist/ng-bootstrap instead of just #ng-bootstrap/ng-bootstrap). But to be clear I wouldn't recommend it as you would have to have different imports in your server-side and client-side code.
I think you can create two module. One is for browser is imported ng-bootstrap, one is for server is not imported ng-bootstrap. I think you have to create one more module common to share component, service for browser module and server module. Modal doesn't render by server to SEO.
Hello.
I have an wierd error. I recently reinstalled everything on my laptop. Now i ran into troubles. Everytime i use this config from package.json i get error pushing to heroku.
{
"name": "mrfrederiksen",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "ng build --aot -prod",
"start": "node server.js"
},
"engines": {
"node": "7.7.3",
"npm": "4.1.2"
},
"private": true,
"dependencies": {
"#angular/cli": "1.0.0",
"#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/router": "^4.0.0",
"core-js": "^2.4.1",
"express": "^4.15.2",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#angular/compiler-cli": "^4.0.0",
"#types/jasmine": "2.5.38",
"#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.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
But...
If i use this giving from an friend who have older versions installed everything works.
{
"name": "mrfrederiksen",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "ng build --aot -prod",
"start": "node server.js"
},
"engines": {
"node": "6.9.4",
"npm": "3.10.10"
},
"private": true,
"dependencies": {
"#angular/cli": "1.0.0-rc.0",
"#angular/common": "^2.4.0",
"#angular/compiler": "^2.4.0",
"#angular/core": "^2.4.0",
"#angular/forms": "^2.4.0",
"#angular/http": "^2.4.0",
"#angular/platform-browser": "^2.4.0",
"#angular/platform-browser-dynamic": "^2.4.0",
"#angular/router": "^3.4.0",
"core-js": "^2.4.1",
"express": "^4.15.2",
"rxjs": "^5.1.0",
"zone.js": "^0.7.6"
},
"devDependencies": {
"#angular/compiler-cli": "^2.4.0",
"#types/jasmine": "2.5.38",
"#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.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "~2.0.0"
}
}
Here is my error console messages when using my own with latest versions.
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 7.7.3
engines.npm (package.json): 4.1.2
Downloading and installing node 7.7.3...
npm 4.1.2 already installed with node
-----> Restoring cache
Skipping cache restore (new runtime signature)
-----> Building dependencies
Installing node modules (package.json)
> node-sass#4.5.1 install /tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.1/linux-x64-51_binding.node
Download complete
Binary saved to /tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/node-sass/vendor/linux-x64-51/binding.node
Caching binary to /app/.npm/node-sass/4.5.1/linux-x64-51_binding.node
> node-sass#4.5.1 postinstall /tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/node-sass/vendor/linux-x64-51/binding.node
Testing binary
Binary is fine
> mrfrederiksen#0.0.0 postinstall /tmp/build_5a8b797790355e544758529cdf0f5b1a
> ng build --aot -prod
The "#angular/compiler-cli" package was not properly installed.
Error: The "#angular/compiler-cli" package was not properly installed.
at Object.<anonymous> (/tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/#ngtools/webpack/src/index.js:14:11)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/tmp/build_5a8b797790355e544758529cdf0f5b1a/node_modules/#angular/cli/tasks/eject.js:10:19)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
npm ERR! Linux 3.13.0-112-generic
npm ERR! argv "/tmp/build_5a8b797790355e544758529cdf0f5b1a/.heroku/node/bin/node" "/tmp/build_5a8b797790355e544758529cdf0f5b1a/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_5a8b797790355e544758529cdf0f5b1a/.npmrc"
npm ERR! node v7.7.3
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! mrfrederiksen#0.0.0 postinstall: `ng build --aot -prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mrfrederiksen#0.0.0 postinstall script 'ng build --aot -prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mrfrederiksen package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng build --aot -prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mrfrederiksen
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mrfrederiksen
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /tmp/build_5a8b797790355e544758529cdf0f5b1a/npm-debug.log
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
After I upgraded the npm, node, typescript and ng-cli to its latest versions, I had a similar kind of issue.
Tried many things but nothing worked out.
(ended up with "The "#angular/compiler-cli" package was not properly installed" error).
Then did the following steps:
Create a new project (ng new [project_name]) with new versions
Start the above created project with no code written using 'npm start' successfully
Copied the old projects 'src' folder into the new project folder
Copied folders (bootstrap) in old project in the new project folder
Start the project using 'npm start'
Everything started to work as usual.
Just update typescript v2.2.1 and it works
I am new to angular2 and I have problem with angular 2 package. I have been trying to fix the problem and I couldn't. I am doing some assignment/project and the teacher provide with package.json with assignment. I install npm in locally on project folder as well as globally, but I couldn't start local server. I am running the program at window. The problem is here, when I run npm start or npm start -server I got the following error:
npm ERR! node v6.9.2
npm ERR! npm v2.12.1
npm ERR! code ELIFECYCLE
npm ERR! angular2-boilerplate#1.0.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-boilerplate#1.0.0 start script 'gulp'.
npm ERR! This is most likely a problem with the angular2-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp
npm ERR! You can get their info via:
npm ERR! npm owner ls angular2-boilerplate
npm ERR! There is likely additional logging output above.
package.json file is
{
"name": "angular2-boilerplate",
"version": "1.0.0",
"scripts": {
"start": "gulp",
"gulp": "gulp",
"watch": "gulp watch",
"clean": "gulp clean",
"typings": "typings",
"postinstall": "typings install"
},
"license": "MIT",
"dependencies": {
"#angular/common": "2.0.0-rc.1",
"#angular/compiler": "2.0.0-rc.1",
"#angular/core": "2.0.0-rc.1",
"#angular/http": "2.0.0-rc.1",
"#angular/platform-browser": "2.0.0-rc.1",
"#angular/platform-browser-dynamic": "2.0.0-rc.1",
"#angular/router": "2.0.0-rc.1",
"#angular/router-deprecated": "2.0.0-rc.1",
"#angular/upgrade": "2.0.0-rc.1",
"systemjs": "0.19.27",
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12"
},
"devDependencies": {
"babel-core": "^6.0.15",
"babel-preset-es2015": "^6.0.15",
"browser-sync": "^2.10.1",
"del": "^2.0.0",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-concat": "^2.6.0",
"gulp-concat-css": "^2.2.0",
"gulp-inline-ng2-template": "^1.1.2",
"gulp-minify-css": "^1.2.1",
"gulp-typescript": "^2.10.0",
"gulp-watch": "^4.3.5",
"stream-series": "^0.1.1",
"typescript": "^1.7.3",
"typings":"^0.6.8",
"systemjs-builder": "^0.15.15"
}
}