Closed calebeaires closed 7 years ago
When adding some modules, this starter fails. Here is the package.json
{ "name": "angular2-express-starter", "version": "1.0.0", "description": "Starter application of Angular2 with Express", "main": "server/app.js", "license": "MIT", "scripts": { "start": "concurrently --kill-others 'ng serve --aot=true --progress=false --proxy-config proxy.conf.json' 'npm run _server:run'", "lint": "tslint 'src/**/*.ts'", "test": "ng test --watch=false", "pree2e": "webdriver-manager update", "e2e": "protractor", "build": "ng build --prod --sm=false --aot=true --output-path=dist/client && npm run _server:build", "_server:run": "tsc -p ./server && concurrently 'tsc -w -p ./server' 'nodemon dist/server/bin/www.js'", "_server:build": "tsc -p ./server", "postinstall": "npm run build" }, "author": "Vlado Tešanović", "repository": { "url": "https://github.com/vladotesanovic/angular2-express-starter" }, "private": true, "dependencies": { "@angular/cli": "1.0.0-rc.0", "@angular/common": "^2.4.7", "@angular/compiler": "^2.4.7", "@angular/compiler-cli": "^2.4.7", "@angular/core": "^2.4.7", "@angular/forms": "^2.4.7", "@angular/http": "^2.4.7", "@angular/platform-browser": "^2.4.7", "@angular/platform-browser-dynamic": "^2.4.7", "@angular/router": "^3.4.7", "@ngrx/core": "^1.2.0", "@ngrx/effects": "^2.0.0", "@ngrx/store": "^2.2.1", "@ngrx/store-devtools": "^3.2.1", "@types/body-parser": "^0.0.32", "@types/compression": "^0.0.33", "@types/cors": "^0.0.33", "@types/express": "^4.0.32", "@types/jasmine": "2.5.38", "@types/jsonwebtoken": "^7.1.31", "@types/node": "~6.0.60", "@types/uuid": "^2.0.29", "angular-split": "^0.1.20", "animate.css": "^3.5.2", "async": "^2.1.5", "bcryptjs": "^2.4.3", "body-parser": "~1.13.2", "bootstrap": "^3.3.7", "chart.js": "^2.5.0", "compression": "^1.6.2", "cookie-parser": "~1.3.5", "core-js": "^2.4.1", "cytoscape": "^2.7.16", "cytoscape-dagre": "^1.4.0", "dagre": "^0.7.4", "debug": "^2.6.3", "directory-tree": "^1.2.0", "dragula": "^3.7.2", "express": "^4.13.4", "express-jwt": "^3.3.0", "font-awesome": "^4.7.0", "jquery": "^3.1.1", "jsonwebtoken": "^5.7.0", "knex": "^0.12.7", "lodash": "^4.17.4", "mdi": "^1.8.36", "metismenu": "^2.7.0", "mssql": "^3.3.0", "mysql": "^2.13.0", "ng2-bootstrap": "^1.4.0", "ng2-charts": "^1.5.0", "ng2-dragula": "^1.3.0", "ng2-pagination": "^2.0.1", "ng2-smart-table": "^0.6.0-1", "ng2-toasty": "^2.5.0", "ngrx-store-freeze": "^0.1.6", "normalize.css": "^5.0.0", "oracledb": "^1.12.2", "path": "^0.12.7", "prism-themes": "^1.0.0", "prismjs": "^1.6.0", "random-key": "^0.3.2", "request": "^2.81.0", "rxjs": "^5.1.0", "spinkit": "^1.2.5", "sqlite3": "^3.1.8", "sweetalert2": "^6.4.3", "ts-helpers": "^1.1.1", "ts-node": "~2.0.0", "tslint": "~4.4.2", "typescript": "~2.0.0", "uuid": "^3.0.1", "zone.js": "^0.7.6" }, "devDependencies": { "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", "concurrently": "^3.1.0", "karma-remap-istanbul": "^0.2.1", "nodemon": "^1.11.0", "webdriver-manager": "10.2.5" } }
here is the error on npm run starter
[1] server/app.ts(3,23): error TS2307: Cannot find module 'path'. [1] server/app.ts(4,30): error TS2307: Cannot find module 'compression'. [1] server/app.ts(30,36): error TS2304: Cannot find name '__dirname'. [1] server/bin/www.ts(9,23): error TS2307: Cannot find module 'http'. [1] server/bin/www.ts(14,28): error TS2304: Cannot find name 'process'. [1] server/bin/www.ts(68,7): error TS2304: Cannot find name 'process'. [1] server/bin/www.ts(72,7): error TS2304: Cannot find name 'process'. [1] server/routes/login.ts(2,37): error TS2307: Cannot find module 'crypto'. [1] server/routes/login.ts(27,83): error TS2304: Cannot find name 'Buffer'. [1] server/routes/login.ts(38,88): error TS2304: Cannot find name 'Buffer'. [1] npm [1] ERR! code ELIFECYCLE [1] npm ERR! errno 2 [1] npm ERR! angular2-express-starter@1.0.0 _server:run: `tsc -p ./server && concurrently 'tsc -w -p ./server' 'nodemon dist/server/bin/www.js'` [1] npm ERR! Exit status 2
Seams like types are missing from node_modules,
Did you solve this?
When adding some modules, this starter fails. Here is the package.json
here is the error on npm run starter