hey it worked, I just re-installed the demo file in another directory but my npm seems to be working so much better now. i was lazy and installed homebrew as root and ever after did npm installs wrong. thnk,
On Friday, July 7, 2017 at 11:32:07 AM UTC-7, Lucas Lacroix wrote: > > Alright... That looks like an error coming back from "tsc". > > I think you may be using "-p" incorrectly. According to the doc, that > should be the path to a directory containing a tsconfig.json file. Try > removing it from your "build" command and try again. > > On Fri, Jul 7, 2017 at 2:19 PM Janis Rough <[email protected] > <javascript:>> wrote: > >> I tried all morning to fix this. I was using npm as root so I >> reinstalled everything as regular user using homebrew. I fixed permission >> issues and symlinks. I also fixed my export path. It should all work now. >> it seems I get the same error as before on issuing command npm start. >> >> here is log do you have any other suggestions? tia >> >> 0 info it worked if it ends with ok >> >> 1 verbose cli [ '/usr/local/Cellar/node/8.1.3/bin/node', >> >> 1 verbose cli '/usr/local/bin/npm', >> >> 1 verbose cli 'start' ] >> >> 2 info using [email protected] >> >> 3 info using [email protected] >> >> 4 verbose run-script [ 'prestart', 'start', 'poststart' ] >> >> 5 info lifecycle [email protected]~prestart: >> [email protected] >> >> 6 verbose lifecycle [email protected]~prestart: unsafe-perm in >> lifecycle true >> >> 7 verbose lifecycle [email protected]~prestart: PATH: >> /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/jrough/project/Demo/node_modules/.bin:/usr/local/npm_packages/bin:/usr/local/cellar/bin:/Users/jrough/.npm-packages/bin:/usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin >> >> 8 verbose lifecycle [email protected]~prestart: CWD: >> /Users/jrough/project/Demo >> >> 9 silly lifecycle [email protected]~prestart: Args: [ '-c', 'npm >> run build' ] >> >> 10 silly lifecycle [email protected]~prestart: Returned: code: 2 >> signal: >> null >> >> 11 info lifecycle [email protected]~prestart: Failed to exec >> prestart script >> >> 12 verbose stack Error: [email protected] prestart: `npm run build` >> >> 12 verbose stack Exit status 2 >> >> 12 verbose stack at EventEmitter.<anonymous> >> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16) >> >> 12 verbose stack at emitTwo (events.js:125:13) >> >> 12 verbose stack at EventEmitter.emit (events.js:213:7) >> >> 12 verbose stack at ChildProcess.<anonymous> >> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) >> >> 12 verbose stack at emitTwo (events.js:125:13) >> >> 12 verbose stack at ChildProcess.emit (events.js:213:7) >> >> 12 verbose stack at maybeClose (internal/child_process.js:897:16) >> >> 12 verbose stack at Process.ChildProcess._handle.onexit >> (internal/child_process.js:208:5) >> >> 13 verbose pkgid [email protected] >> >> 14 verbose cwd /Users/jrough/project/Demo >> >> On Thursday, July 6, 2017 at 9:51:52 AM UTC-7, Lucas Lacroix wrote: >> >>> Only use sudo with no if you are installing modules globally. What >>> you've done is, potentially, made the node_modules folder inaccessible. >>> >>> According to line 14, you're running "npm start" from your user's >>> directory instead of a project specific folder. That seems very strange. >>> >>> On Thu, Jul 6, 2017, 12:34 Janis Rough <[email protected]> wrote: >>> >>>> Okay, I reinstalled the demo directory. I ran sudo npm install on top >>>> directory,, didn't get an error. Then I do the command "npm start". >>>> Still get the same error as before. I am in the right directory under >>>> demo same directory as package.json it should launch the package.json. >>>> >>>> npm start >>>> >>>> npm ERR! path /Users/jrough/package.json >>>> >>>> npm ERR! code ENOENT >>>> >>>> npm ERR! errno -2 >>>> >>>> npm ERR! syscall open >>>> >>>> npm ERR! enoent ENOENT: no such file or directory, open >>>> '/Users/jrough/package.json' >>>> >>>> npm ERR! enoent This is related to npm not being able to find a file. >>>> >>>> npm ERR! enoent >>>> >>>> >>>> npm ERR! A complete log of this run can be found in: >>>> >>>> npm ERR! /var/root/.npm/_logs/2017-07-06T16_27_44_505Z-debug.log >>>> >>>> >>>> >>>> sh-3.2# >>>> >>>> >>>> ---log--- >>>> >>>> >>>> info it worked if it ends with ok >>>> >>>> 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] >>>> >>>> 2 info using [email protected] >>>> >>>> 3 info using [email protected] >>>> >>>> 4 verbose stack Error: ENOENT: no such file or directory, open >>>> '/Users/jrough/package.json' >>>> >>>> 5 verbose cwd /Users/jrough/project >>>> >>>> 6 verbose Darwin 16.6.0 >>>> >>>> 7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" >>>> >>>> 8 verbose node v7.10.0 >>>> >>>> 9 verbose npm v5.0.4 >>>> >>>> 10 error path /Users/jrough/package.json >>>> >>>> 11 error code ENOENT >>>> >>>> 12 error errno -2 >>>> >>>> 13 error syscall open >>>> >>>> 14 error enoent ENOENT: no such file or directory, open >>>> '/Users/jrough/package.json' >>>> >>>> 15 error enoent This is related to npm not being able to find a file. >>>> >>>> 16 verbose exit [ -2, true ] >>>> >>>> ~ >>>> >>>> >>>> ~ >>>> >>>> On Thursday, July 6, 2017 at 7:06:01 AM UTC-7, Lucas Lacroix wrote: >>>> >>>>> You need to run npm from the directory where the package.json lives. >>>>> All paths in your configuration must be relative to that location. >>>>> >>>>> Does that make sense? >>>>> >>>>> On Thu, Jul 6, 2017, 10:02 Janis Rough <[email protected]> wrote: >>>>> >>>> src is a directory not a file: I tried npm start from one level up >>>>>> where is the package.json file . tried npm start and got this error >>>>>> from >>>>>> the log >>>>>> >>>>>> ---log--- >>>>>> >>>>>> 0 info it worked if it ends with ok >>>>>> >>>>>> 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] >>>>>> >>>>>> 2 info using [email protected] >>>>>> >>>>>> 3 info using [email protected] >>>>>> >>>>>> 4 verbose run-script [ 'prestart', 'start', 'poststart' ] >>>>>> >>>>>> 5 info lifecycle [email protected]~prestart: >>>>>> [email protected] >>>>>> >>>>>> 6 verbose lifecycle [email protected]~prestart: unsafe-perm in >>>>>> lifecycle true >>>>>> >>>>>> 7 verbose lifecycle [email protected]~prestart: PATH: >>>>>> /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/jrough/project/Demo/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin >>>>>> >>>>>> 8 verbose lifecycle [email protected]~prestart: CWD: >>>>>> /Users/jrough/project/Demo >>>>>> >>>>>> 9 silly lifecycle [email protected]~prestart: Args: [ '-c', >>>>>> 'npm run build' ] >>>>>> >>>>>> 10 silly lifecycle [email protected]~prestart: Returned: code: >>>>>> 1 signal: null >>>>>> >>>>>> 11 info lifecycle [email protected]~prestart: Failed to exec >>>>>> prestart script >>>>>> >>>>>> 12 verbose stack Error: [email protected] prestart: `npm run >>>>>> build` >>>>>> >>>>>> 12 verbose stack Exit status 1 >>>>>> >>>>>> 12 verbose stack at EventEmitter.<anonymous> >>>>>> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16) >>>>>> >>>>>> 12 verbose stack at emitTwo (events.js:106:13) >>>>>> >>>>>> 12 verbose stack at EventEmitter.emit (events.js:194:7) >>>>>> >>>>>> 12 verbose stack at ChildProcess.<anonymous> >>>>>> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) >>>>>> >>>>>> 12 verbose stack at emitTwo (events.js:106:13) >>>>>> >>>>>> 12 verbose stack at ChildProcess.emit (events.js:194:7) >>>>>> >>>>>> 12 verbose stack at maybeClose (internal/child_process.js:899:16) >>>>>> >>>>>> 12 verbose stack at Process.ChildProcess._handle.onexit >>>>>> (internal/child_process.js:226:5) >>>>>> >>>>>> 13 verbose pkgid [email protected] >>>>>> >>>>>> 14 verbose cwd /Users/jrough/project/Demo >>>>>> >>>>>> 15 verbose Darwin 16.6.0 >>>>>> >>>>>> 16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" >>>>>> >>>>>> 17 verbose node v7.10.0 >>>>>> >>>>>> 18 verbose npm v5.0.4 >>>>>> >>>>>> 19 error code ELIFECYCLE >>>>>> >>>>>> 20 error errno 1 >>>>>> >>>>>> 21 error [email protected] prestart: `npm run build` >>>>>> >>>>>> 21 error Exit status 1 >>>>>> >>>>>> 22 error Failed at the [email protected] prestart script. >>>>>> >>>>>> 22 error This is probably not a problem with npm. There is likely >>>>>> additional logging output above. >>>>>> >>>>>> 23 verbose exit [ 1, true ] >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> --- >>>>>> >>>>>> sh-3.2# vi package.json >>>>>> >>>>>> >>>>>> "protractor": "protractor protractor.config.js", >>>>>> >>>>>> "pretest": "npm run build", >>>>>> >>>>>> "test": "concurrently \"npm run build:watch\" \"karma start >>>>>> karma.conf.js\"", >>>>>> >>>>>> "pretest:once": "npm run build", >>>>>> >>>>>> "test:once": "karma start karma.conf.js --single-run", >>>>>> >>>>>> "lint": "tslint ./src/**/*.ts -t verbose" >>>>>> >>>>>> }, >>>>>> >>>>>> "keywords": [], >>>>>> >>>>>> "author": "", >>>>>> >>>>>> "license": "MIT", >>>>>> >>>>>> "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/router": "~4.0.0", >>>>>> >>>>>> >>>>>> "angular-in-memory-web-api": "~0.3.0", >>>>>> >>>>>> "systemjs": "0.19.40", >>>>>> >>>>>> "core-js": "^2.4.1", >>>>>> >>>>>> "rxjs": "5.0.1", >>>>>> >>>>>> "zone.js": "^0.8.4" >>>>>> >>>>>> }, >>>>>> >>>>>> "devDependencies": { >>>>>> >>>>>> "concurrently": "^3.2.0", >>>>>> >>>>>> "lite-server": "^2.2.2", >>>>>> >>>>>> "typescript": "~2.1.0", >>>>>> >>>>>> >>>>>> "canonical-path": "0.0.2", >>>>>> >>>>>> "tslint": "^3.15.1", >>>>>> >>>>>> "lodash": "^4.16.4", >>>>>> >>>>>> "jasmine-core": "~2.4.1", >>>>>> >>>>>> "karma": "^1.3.0", >>>>>> >>>>>> "karma-chrome-launcher": "^2.0.0", >>>>>> >>>>>> "karma-cli": "^1.0.1", >>>>>> >>>>>> "karma-jasmine": "^1.0.2", >>>>>> >>>>>> "karma-jasmine-html-reporter": "^0.2.2", >>>>>> >>>>>> "protractor": "~4.0.14", >>>>>> >>>>>> "rimraf": "^2.5.4", >>>>>> >>>>>> >>>>>> "@types/node": "^6.0.46", >>>>>> >>>>>> "@types/jasmine": "2.5.36" >>>>>> >>>>>> }, >>>>>> >>>>>> "repository": {} >>>>>> >>>>>> >>>>>> this is the package.json file. it is up one directory in the demo >>>>>> file. There is no other files except package.json. >>>>>> >>>>>> On Wednesday, July 5, 2017 at 4:06:37 PM UTC-7, Janis Rough wrote: >>>>>>> >>>>>>> I have installed lates update of npm. I have done npm run build. >>>>>>> I have enclosed the log. Is it something to do with my export path? >>>>>>> see >>>>>>> lines between 9 and 10. It should be reading the config file. Also >>>>>>> below >>>>>>> is my config file. I don't know what to try. TIA >>>>>>> >>>>>>> >>>>>>> ------log---- >>>>>>> >>>>>>> info it worked if it ends with ok >>>>>>> >>>>>>> 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', >>>>>>> 'build' ] >>>>>>> >>>>>>> 2 info using [email protected] >>>>>>> >>>>>>> 3 info using [email protected] >>>>>>> >>>>>>> 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] >>>>>>> >>>>>>> 5 info lifecycle [email protected]~prebuild: >>>>>>> [email protected] >>>>>>> >>>>>>> 6 silly lifecycle [email protected]~prebuild: no script for >>>>>>> prebuild, continuing >>>>>>> >>>>>>> 7 info lifecycle [email protected]~build: >>>>>>> [email protected] >>>>>>> >>>>>>> 8 verbose lifecycle [email protected]~build: unsafe-perm in >>>>>>> lifecycle true >>>>>>> >>>>>>> 9 verbose lifecycle [email protected]~build: PATH: >>>>>>> /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/jrough/project/Demo/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin >>>>>>> >>>>>>> 10 verbose lifecycle [email protected]~build: CWD: >>>>>>> /Users/jrough/project/Demo >>>>>>> >>>>>>> 11 silly lifecycle [email protected]~build: Args: [ '-c', >>>>>>> 'tsc -p src/' ] >>>>>>> >>>>>>> 12 info lifecycle [email protected]~build: Failed to exec >>>>>>> build script >>>>>>> >>>>>>> 13 verbose stack Error: [email protected] build: `tsc -p src/` >>>>>>> >>>>>>> 13 verbose stack spawn ENOENT >>>>>>> >>>>>>> 13 verbose stack at ChildProcess.<anonymous> >>>>>>> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16) >>>>>>> >>>>>>> 13 verbose stack at emitTwo (events.js:106:13) >>>>>>> >>>>>>> 13 verbose stack at ChildProcess.emit (events.js:194:7) >>>>>>> >>>>>>> 13 verbose stack at maybeClose >>>>>>> (internal/child_process.js:899:16) >>>>>>> >>>>>>> 13 verbose stack at Process.ChildProcess._handle.onexit >>>>>>> (internal/child_process.js:226:5) >>>>>>> >>>>>>> 14 verbose pkgid [email protected] >>>>>>> >>>>>>> 15 verbose cwd /Users/jrough/project/Demo/src >>>>>>> >>>>>>> 16 verbose Darwin 16.6.0 >>>>>>> >>>>>>> 17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" >>>>>>> "build" >>>>>>> >>>>>>> 18 verbose node v7.10.0 >>>>>>> >>>>>>> 19 verbose npm v4.6.1 >>>>>>> >>>>>>> 20 error file sh >>>>>>> >>>>>>> 21 error code ELIFECYCLE >>>>>>> >>>>>>> 22 error errno ENOENT >>>>>>> >>>>>>> 23 error syscall spawn >>>>>>> >>>>>>> 24 error [email protected] build: `tsc -p src/` >>>>>>> >>>>>>> 24 error spawn ENOENT >>>>>>> >>>>>>> 25 error Failed at the [email protected] build script. >>>>>>> >>>>>>> >>>>>>> ----config---- >>>>>>> >>>>>>> { >>>>>>> >>>>>>> "name": "angular-quickstart", >>>>>>> >>>>>>> "version": "1.0.0", >>>>>>> >>>>>>> "description": "QuickStart package.json from the documentation, >>>>>>> supplemented with testing support", >>>>>>> >>>>>>> "scripts": { >>>>>>> >>>>>>> "build": "tsc -p src/", >>>>>>> >>>>>>> "build:watch": "tsc -p src/ -w", >>>>>>> >>>>>>> "build:e2e": "tsc -p e2e/", >>>>>>> >>>>>>> "serve": "lite-server -c=bs-config.json", >>>>>>> >>>>>>> "serve:e2e": "lite-server -c=bs-config.e2e.json", >>>>>>> >>>>>>> "prestart": "npm run build", >>>>>>> >>>>>>> "start": "concurrently \"npm run build:watch\" \"npm run >>>>>>> serve\"", >>>>>>> >>>>>>> "pree2e": "npm run build:e2e", >>>>>>> >>>>>>> "e2e": "concurrently \"npm run serve:e2e\" \"npm run >>>>>>> protractor\" --kill-others --success first", >>>>>>> >>>>>>> "preprotractor": "webdriver-manager update", >>>>>>> >>>>>>> "protractor": "protractor protractor.config.js", >>>>>>> >>>>>>> "pretest": "npm run build", >>>>>>> >>>>>>> "test": "concurrently \"npm run build:watch\" \"karma start >>>>>>> karma.conf.js\"", >>>>>>> >>>>>>> "pretest:once": "npm run build", >>>>>>> >>>>>>> "test:once": "karma start karma.conf.js --single-run", >>>>>>> >>>>>>> "lint": "tslint ./src/**/*.ts -t verbose" >>>>>>> >>>>>>> }, >>>>>>> >>>>>>> "keywords": [], >>>>>>> >>>>>>> "author": "", >>>>>>> >>>>>>> "license": "MIT", >>>>>>> >>>>>>> "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/router": "~4.0.0", >>>>>>> >>>>>>> >>>>>>> "angular-in-memory-web-api": "~0.3.0", >>>>>>> >>>>>>> "systemjs": "0.19.40", >>>>>>> >>>>>>> "core-js": "^2.4.1", >>>>>>> >>>>>>> "rxjs": "5.0.1", >>>>>>> >>>>>>> "zone.js": "^0.8.4" >>>>>>> >>>>>>> }, >>>>>>> >>>>>>> "devDependencies": { >>>>>>> >>>>>>> "concurrently": "^3.2.0", >>>>>>> >>>>>>> "lite-server": "^2.2.2", >>>>>>> >>>>>>> "typescript": "~2.1.0", >>>>>>> >>>>>>> >>>>>>> "canonical-path": "0.0.2", >>>>>>> >>>>>>> "tslint": "^3.15.1", >>>>>>> >>>>>>> "lodash": "^4.16.4", >>>>>>> >>>>>>> "jasmine-core": "~2.4.1", >>>>>>> >>>>>>> "karma": "^1.3.0", >>>>>>> >>>>>>> "karma-chrome-launcher": "^2.0.0", >>>>>>> >>>>>>> "karma-cli": "^1.0.1", >>>>>>> >>>>>>> "karma-jasmine": "^1.0.2", >>>>>>> >>>>>>> "karma-jasmine-html-reporter": "^0.2.2", >>>>>>> >>>>>>> "protractor": "~4.0.14", >>>>>>> >>>>>>> "rimraf": "^2.5.4", >>>>>>> >>>>>>> >>>>>>> "@types/node": "^6.0.46", >>>>>>> >>>>>>> "@types/jasmine": "2.5.36" >>>>>>> >>>>>>> }, >>>>>>> >>>>>>> "repository": {} >>>>>>> >>>>>>> } >>>>>>> >>>>>>> >>>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Angular and AngularJS discussion" group. >>>>>> >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>>> an email to [email protected]. >>>>>> To post to this group, send email to [email protected]. >>>>> >>>>> >>>>>> Visit this group at https://groups.google.com/group/angular. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- >>>>> Lucas Lacroix >>>>> Computer Scientist >>>>> Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> >>>>> 781-774-2293 >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Angular and AngularJS discussion" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/angular. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> Lucas Lacroix >>> Computer Scientist >>> Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> >>> 781-774-2293 >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Angular and AngularJS discussion" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/angular. >> For more options, visit https://groups.google.com/d/optout. >> > -- > Lucas Lacroix > Computer Scientist > Advanced Technology Division, MEDITECH <http://ehr.meditech.com/> > 781-774-2293 > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
