Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

npm install produces cmd and shell files in the root directory #713

Closed
NGeodakov opened this issue Oct 14, 2016 · 16 comments
Closed

npm install produces cmd and shell files in the root directory #713

NGeodakov opened this issue Oct 14, 2016 · 16 comments

Comments

@NGeodakov
Copy link

Prerequisites

.typingsrc:
{
"rejectUnauthorized" : false,
"strict-ssl" : false
}

package.json:
{
"name": "product-management",
"version": "1.0.0",
"author": "Deborah Kurata",
"description": "Package for the Acme Product Management sample application",
"scripts": {
"start": "concurrently "npm run tsc:w" "npm run lite" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lint": "tslint ./app/*/.ts -t verbose",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install",
"webdriver:update": "webdriver-manager update"
},
"license": "ISC",
"dependencies": {
"@angular/common": "~2.0.2",
"@angular/compiler": "~2.0.2",
"@angular/core": "~2.0.2",
"@angular/forms": "~2.0.2",
"@angular/http": "~2.0.2",
"@angular/platform-browser": "~2.0.2",
"@angular/platform-browser-dynamic": "~2.0.2",
"@angular/router": "~3.0.2",
"@angular/upgrade": "~2.0.2",

    "angular-in-memory-web-api": "~0.1.5",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "systemjs": "0.19.39",
    "zone.js": "^0.6.25"

},
"devDependencies": {
"concurrently": "^3.0.0",
"lite-server": "^2.2.2",
"typescript": "^2.0.3",
"typings":"^1.4.0",

"canonical-path": "0.0.2",
"http-server": "^0.9.0",
"tslint": "^3.7.4",
"lodash": "^4.11.1",
"jasmine-core": "~2.4.1",
"karma": "^1.2.0",
"karma-chrome-launcher": "^0.2.3",
"karma-cli": "^0.1.2",
"karma-htmlfile-reporter": "^0.2.2",
"karma-jasmine": "^0.3.8",
"protractor": "^3.3.0",
"rimraf": "^2.5.2"

},

"repository": {}
}

system.config.js:
/**

  • System configuration for Angular 2 samples

  • Adjust as necessary for your application needs.
    */
    (function(global) {

    // map tells the System loader where to look for things
    var map = {
    'app': 'app',
    '@angular': 'node_modules/@angular',
    'rxjs': 'node_modules/rxjs'
    };

    // packages tells the System loader how to load when no filename and/or no extension
    var packages = {
    'app': { main: 'main.js', defaultExtension: 'js' },
    'rxjs': { defaultExtension: 'js' }
    };

    var packageNames = [
    '@angular/common',
    '@angular/compiler',
    '@angular/core',
    '@angular/forms',
    '@angular/http',
    '@angular/platform-browser',
    '@angular/platform-browser-dynamic',
    '@angular/router'
    ];

    // add package entries for angular packages in the form
    // '@angular/common': { main: 'index.js', defaultExtension: 'js' }
    packageNames.forEach(function(pkgName) {
    packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
    });

    var config = {
    map: map,
    packages: packages
    };

    System.config(config);

})(this);

tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
}
}

tslint.json:
{
"rules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": true,
"forin": true,
"indent": [
true,
"spaces"
],
"label-position": true,
"label-undefined": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
"static-before-instance",
"variables-before-functions"
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-eval": true,
"no-inferrable-types": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-unused-variable": true,
"no-unreachable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}

typings.json:
{
"globalDependencies": {
"angular-protractor": "registry:dt/angular-protractor#1.5.0+20160914235635",
"core-js": "registry:dt/core-js#0.0.0+20160914114559",
"jasmine": "registry:dt/jasmine#2.5.0+20161003201800",
"node": "registry:dt/node#6.0.0+20161010101523",
"selenium-webdriver": "registry:dt/selenium-webdriver#2.53.1+20160914235635"
}
}

Description

When I run the command

npm install
I get a bunch of *.cmd and shell files in the app root directory. Among them is the typings shell file:

!/bin/sh

basedir=$(dirname "$(echo "$0" | sed -e 's,,/,g')")

case uname in
CYGWIN) basedir=cygpath -w "$basedir";;
esac

if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/node_modules/typings/dist/bin.js" "$@"
ret=$?
else
node "$basedir/node_modules/typings/dist/bin.js" "$@"
ret=$?
fi
exit $ret

And there is the typings.cmd file in the root directory as well:
@if EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\typings\dist\bin.js" %*
) ELSE (
@SETLOCAL
@set PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\node_modules\typings\dist\bin.js" %*
)

Steps to Reproduce

npm install

Expected behavior: [What did you expect to happen?]
I expected to get everything installed.

Actual behavior: [What actually happened?]

After running that >npm install command I get the following errors (from the command screen):

typings install

typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/angular-protractor/tags/1.5.0%2B20160914235635"
typings ERR! caused by write EPROTO 101057795:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:openssl\ssl\s23_lib.c:177:
typings ERR! caused by

typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings ERR! system Windows_NT 10.0.10240
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules\typings\dist\bin.js" "install"
typings ERR! node -v v6.7.0
typings ERR! typings -v 1.4.0
typings ERR! code EUNAVAILABLE

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! product-management@1.0.0 postinstall: typings install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the product-management@1.0.0 postinstall script 'typings install'.
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 product-management package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs product-management
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls product-management
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\npm-debug.log

I assume the presense of the typings shell file in the root directory prevents typings installation.

Unfortunately I was not able to attach files to make the issue text shorter. I got the error "Something went really wrong, and we can't process that file. Try again" I tried again but to no avail.

Versions

npm -v
3.10.3

node -v
v6.7.0

typings -v
1.4.0

Please help.

Thank you
Nuren Geodakov

[From typings -v]

@blakeembrey
Copy link
Member

caused by write EPROTO 101057795:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:openssl\ssl\s23_lib.c:177:

Looks like a duplicate of #564 (comment).

@NGeodakov
Copy link
Author

Ok, I assumed it was a duplicate of #564. I changed the .typingsrc to
{
"rejectUnauthorized" : false,
"registryurl": "http://api.typings.org/"
}
And I've got the same error:

typings install

typings ERR! message EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'

typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings ERR! system Windows_NT 10.0.10240
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules\typings\dist\bin.js" "install"
typings ERR! node -v v6.7.0
typings ERR! typings -v 1.4.0
typings ERR! code EEXIST

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! product-management@1.0.0 postinstall: typings install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the product-management@1.0.0 postinstall script 'typings install'.
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 product-management package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs product-management
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls product-management
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\npm-debug.log

The erros sequence begins with
typings ERR! message EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'

And I suspect that happened because the typings shell file was created in the root directory.
And I still can see abunch of cmd and shell files in the root directory. They should not be there. What is wrong with the setup files? (See above)

@blakeembrey
Copy link
Member

That seems odd. We use mkdirp to create the typings directories. What's the stack trace say (I think it can be enabled with --verbose)?

Also, when you post code blocks on GitHub, it helps to use three backticks as a fence so everything inside is monospaced code. Helps people read the comments. E.g.

stack trace here

@NGeodakov
Copy link
Author

I deleted npm_modules directory and all cmd and shell files from the root directory. Then I created the typings directory >mkdir typing. After that I ran the >npm install command and got the error:
npm ERR! eisdir EISDIR: illegal operation on a directory, open 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'
The error says that npm tries to open typings file; but in this case typings is a directory

@blakeembrey
Copy link
Member

Can you share the command that you're running? Is it an NPM error or a Typings error? If you're getting issues with both, perhaps you're doing something else.

@NGeodakov
Copy link
Author

Here is the stack trace beginning with ERR:

product-management@1.0.0 postinstall C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings install

typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/jasmine/tags/2.5.0%2B20161003201800"
typings ERR! caused by write EPROTO 101057795:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:openssl\ssl\s23_lib.c:177:
typings ERR! caused by

typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings ERR! system Windows_NT 10.0.10240
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules\typings\dist\bin.js" "install"
typings ERR! node -v v6.7.0
typings ERR! typings -v 1.4.0
typings ERR! code EUNAVAILABLE

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

npm verb lifecycle product-management@1.0.0postinstall: unsafe-perm in lifecycle true
npm verb lifecycle product-management@1.0.0
postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules.bin;C:\Program Files\nodejs;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Sennheiser\SoftphoneSDK;C:\Users\NGeodakov.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\nodejs;;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\NGeodakov\AppData\Roaming\npm;C:\Program Files\nodejs
npm verb lifecycle product-management@1.0.0postinstall: CWD: C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
npm info lifecycle product-management@1.0.0
postinstall: Failed to exec postinstall script
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm verb stack Error: product-management@1.0.0 postinstall: typings install
npm verb stack Exit status 1
npm verb stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:242:16)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at EventEmitter.emit (events.js:191:7)
npm verb stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at ChildProcess.emit (events.js:191:7)
npm verb stack at maybeClose (internal/child_process.js:877:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm verb pkgid product-management@1.0.0
npm verb cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--verbose"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! product-management@1.0.0 postinstall: typings install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the product-management@1.0.0 postinstall script 'typings install'.
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 product-management package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs product-management
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls product-management
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR! C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\npm-debug.log

I hall try to use https instead of http in the .typingsrc settings:

"registryurl": "http://api.typings.org/"

From: Blake Embrey [mailto:notifications@github.com]
Sent: Friday, October 14, 2016 3:24 PM
To: typings/typings typings@noreply.github.com
Cc: Nuren Geodakov NGeodakov@republicbank.com; Author author@noreply.github.com
Subject: Re: [typings/typings] npm install produces cmd and shell files in the root directory (#713)

Can you share the command that you're running? Is it an NPM error or a Typings error? If you're getting issues with both, perhaps you're doing something else.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/713#issuecomment-253897514, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATgwrI5x13SHPoF6XC7IDt5wZBe5-EpFks5qz9a-gaJpZM4KXHs9.
This electronic message is intended for transmission by Republic Bank & Trust Company to authorized persons only. It may contain information that is confidential, privileged, proprietary or subject to other confidentiality protections. It is not intended for transmission to, or receipt by, any unauthorized persons. If you are not authorized to receive this message, you may not review, copy, forward or otherwise distribute this message. If you have received this message in error, please notify the sender by reply e-mail and delete it from your system. Thank you.

Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure

@NGeodakov
Copy link
Author

Now, after changing http to https I got this:

product-management@1.0.0 postinstall C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings install

typings ERR! message EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'

typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings ERR! system Windows_NT 10.0.10240
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules\typings\dist\bin.js" "install"
typings ERR! node -v v6.7.0
typings ERR! typings -v 1.4.0
typings ERR! code EEXIST

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

npm verb lifecycle product-management@1.0.0postinstall: unsafe-perm in lifecycle true
npm verb lifecycle product-management@1.0.0
postinstall: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules.bin;C:\Program Files\nodejs;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Sennheiser\SoftphoneSDK;C:\Users\NGeodakov.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\120\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files\nodejs;;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\NGeodakov\AppData\Roaming\npm;C:\Program Files\nodejs
npm verb lifecycle product-management@1.0.0postinstall: CWD: C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
npm info lifecycle product-management@1.0.0
postinstall: Failed to exec postinstall script
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN optional Skipping failed optional dependency /browser-sync/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm verb stack Error: product-management@1.0.0 postinstall: typings install
npm verb stack Exit status 1
npm verb stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:242:16)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at EventEmitter.emit (events.js:191:7)
npm verb stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
npm verb stack at emitTwo (events.js:106:13)
npm verb stack at ChildProcess.emit (events.js:191:7)
npm verb stack at maybeClose (internal/child_process.js:877:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm verb pkgid product-management@1.0.0
npm verb cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--verbose"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! product-management@1.0.0 postinstall: typings install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the product-management@1.0.0 postinstall script 'typings install'.
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 product-management package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs product-management
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls product-management
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR! C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\npm-debug.log

From: Blake Embrey [mailto:notifications@github.com]
Sent: Friday, October 14, 2016 3:24 PM
To: typings/typings typings@noreply.github.com
Cc: Nuren Geodakov NGeodakov@republicbank.com; Author author@noreply.github.com
Subject: Re: [typings/typings] npm install produces cmd and shell files in the root directory (#713)

Can you share the command that you're running? Is it an NPM error or a Typings error? If you're getting issues with both, perhaps you're doing something else.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/713#issuecomment-253897514, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATgwrI5x13SHPoF6XC7IDt5wZBe5-EpFks5qz9a-gaJpZM4KXHs9.
This electronic message is intended for transmission by Republic Bank & Trust Company to authorized persons only. It may contain information that is confidential, privileged, proprietary or subject to other confidentiality protections. It is not intended for transmission to, or receipt by, any unauthorized persons. If you are not authorized to receive this message, you may not review, copy, forward or otherwise distribute this message. If you have received this message in error, please notify the sender by reply e-mail and delete it from your system. Thank you.

Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure

@NGeodakov
Copy link
Author

I have verified that the >npm typings install command cannot create typings folder because there is the typings shell file:

@blakeembrey
Copy link
Member

blakeembrey commented Oct 14, 2016

Honestly, I still don't know what you're talking about. What shell file? Can you run typings install --verbose as I asked? Please run it outside of NPM so I can help figure out what the issue is.

Again, please use back ticks for code blocks to make it easier for maintainers to read your report and help you.

@blakeembrey
Copy link
Member

blakeembrey commented Oct 14, 2016

Also, the setting should be registryURL - the entry you're doing isn't changing anything because of the casing mismatch.

@NGeodakov
Copy link
Author

Hello, Blake

I shall try to explain the problem again.

After the >npm install command finish I have a bunch of files in the application root directory that are not supposed to be there:

[cid:image001.png@01D22849.8913B720]

The files that I highlighted have the following contents:

typings:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,,/,g')")

case uname in
CYGWIN) basedir=cygpath -w "$basedir";;
esac

if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/node_modules/typings/dist/bin.js" "$@"
ret=$?
else
node "$basedir/node_modules/typings/dist/bin.js" "$@"
ret=$?
fi
exit $ret

typings.cmd:

@if EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\typings\dist\bin.js" %*
) ELSE (
@SETLOCAL
@set PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\node_modules\typings\dist\bin.js" %*
)

When I run the command >typings install –verbose I get the error:

C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated>typings install --verbose
typings WARN deprecated 10/14/2016: "registry:dt/node#6.0.0+20161010101523" is deprecated (updated, replaced or removed)
typings ERR! message EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'

typings ERR! stack Error: EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'
typings ERR! stack at Error (native)

typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated
typings ERR! system Windows_NT 10.0.10240
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\node_modules\typings\dist\bin.js" "install" "--verbose"
typings ERR! node -v v6.7.0
typings ERR! typings -v 1.4.0
typings ERR! code EEXIST

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

The typings directory cannot be created because there is already a file typings in the root directory.
And this is the main problem that I tried to explain.

When I worked with other Angular2 applications I have never seen the cmd and “shell” files in the roor directory.
Some settings in the *.json files or in system.config.js lead to their generation in the root.

By the way, I used the settings in the .typingsrc file:

{
"rejectUnauthorized" : false,
"registryURL": "https://api.typings.org/"
}

I also tried http instead of https. Each time I got the handshake error.

Thanks
Nuren Geodakov

From: Blake Embrey [mailto:notifications@github.com]
Sent: Friday, October 14, 2016 4:07 PM
To: typings/typings typings@noreply.github.com
Cc: Nuren Geodakov NGeodakov@republicbank.com; Author author@noreply.github.com
Subject: Re: [typings/typings] npm install produces cmd and shell files in the root directory (#713)

Also, the setting should be registryURL - the entry you're doing isn't changing anything.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/713#issuecomment-253906493, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ATgwrDIzBQuVSwHZ2MYKJOjEK0TfZvUMks5qz-DigaJpZM4KXHs9.
This electronic message is intended for transmission by Republic Bank & Trust Company to authorized persons only. It may contain information that is confidential, privileged, proprietary or subject to other confidentiality protections. It is not intended for transmission to, or receipt by, any unauthorized persons. If you are not authorized to receive this message, you may not review, copy, forward or otherwise distribute this message. If you have received this message in error, please notify the sender by reply e-mail and delete it from your system. Thank you.

Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure

@blakeembrey
Copy link
Member

I can not see the image, can you please attach it using GitHub. Again, can you please use code blocks - it makes my life 100x easier when reading comments. That shell file you talk about isn't from Typings, but it looks like it might be generated by NPM which is normal. However, it should exist under node_modules or not in root. Either way, I think I understand a little more - you can't install Typings modules because typings already exists as a file. What if you just remove typings and then do a typings install?

@NGeodakov
Copy link
Author

Hello, Blake
I did try to delete typings file and run typings install. What happens is that the typings file is created again and then I see the same error:
typings ERR! stack Error: EEXIST: file already exists, mkdir 'C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated\typings'
For some reason I cannot attach files here. Each time I try to do that I see the error:

Something went really wrong, and we can't process that file. Try again
I wish I could send you the whole project (zipped) but I just cannot do it, getting the error shown above. However, the *.json files are shown at the very beginning of this page (Prerequisites).
I am completely lost. However, I shall try to start from an empty project and localize the issue.

Thanks
Nuren Geodakov

@NGeodakov
Copy link
Author

NGeodakov commented Oct 18, 2016

Blake,

I created an empty application and put .typingsrc, package.json, system.config.js, tsconfig.json, tslint.json and typings.json in it. I had no problems whatsoever running the npm install command. All those *.cmd and "shell" files were not generated in the root. I added the typescript code (components, modules, etc.) to the application and now I can see my application errors:

typings/globals/angular-protractor/index.d.ts(17,27): error TS2305: Module 'webdriver' has no exported member 'IButton'.
typings/globals/angular-protractor/index.d.ts(20,24): error TS2305: Module 'webdriver' has no exported member 'IKey'.
typings/globals/angular-protractor/index.d.ts(23,45): error TS2339: Property 'Error' does not exist on type 'typeof error'.
typings/globals/angular-protractor/index.d.ts(24,40): error TS2305: Module 'webdriver.error' has no exported member 'IErrorCode'.
typings/globals/angular-protractor/index.d.ts(31,37): error TS2305: Module 'webdriver.logging' has no exported member 'IType'.
typings/globals/angular-protractor/index.d.ts(32,38): error TS2305: Module 'webdriver.logging' has no exported member 'ILevelValues'.
typings/globals/angular-protractor/index.d.ts(34,67): error TS2305: Module 'webdriver.logging' has no exported member 'ILevel'.
typings/globals/angular-protractor/index.d.ts(35,67): error TS2305: Module 'webdriver.logging' has no exported member 'ILevel'.
typings/globals/angular-protractor/index.d.ts(282,39): error TS2339: Property 'stacktrace' does not exist on type 'typeof webdriver'.
typings/globals/angular-protractor/index.d.ts(283,42): error TS2339: Property 'stacktrace' does not exist on type 'typeof webdriver'.
typings/globals/angular-protractor/index.d.ts(298,35): error TS2305: Module 'webdriver' has no exported member 'stacktrace'.
typings/globals/angular-protractor/index.d.ts(335,55): error TS2305: Module 'webdriver' has no exported member 'Locator'.

I shall figure out what they mean and fix them.
Thank you for your help
Nuren Geodakov

@unional Edit: Change to blocked code for easier reading

@codewreaker
Copy link

Similar Issue here, any progress or solution?

@blakeembrey
Copy link
Member

@codewreaker What exactly is your issue? This one is closed and resolved if you read it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants