-
Notifications
You must be signed in to change notification settings - Fork 261
npm install produces cmd and shell files in the root directory #713
Comments
Looks like a duplicate of #564 (comment). |
Ok, I assumed it was a duplicate of #564. I changed the .typingsrc to
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! If you need help, you may report this error at: npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm ERR! Please include the following file with any support request: The erros sequence begins with And I suspect that happened because the typings shell file was created in the root directory. |
That seems odd. We use 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.
|
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: |
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. |
Here is the stack trace beginning with ERR:
typings ERR! message Unable to connect to "https://api.typings.org/entries/dt/jasmine/tags/2.5.0%2B20161003201800" typings ERR! cwd C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated typings ERR! If you need help, you may report this error at: npm verb lifecycle product-management@1.0.0 npm ERR! Please include the following file with any support request: 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] 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. — Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure |
Now, after changing http to https I got this:
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! If you need help, you may report this error at: npm verb lifecycle product-management@1.0.0 npm ERR! Please include the following file with any support request: From: Blake Embrey [mailto:notifications@github.com] 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. — Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure |
I have verified that the >npm typings install command cannot create typings folder because there is the typings shell file: |
Honestly, I still don't know what you're talking about. What shell file? Can you run Again, please use back ticks for code blocks to make it easier for maintainers to read your report and help you. |
Also, the setting should be |
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 case if [ -x "$basedir/node" ]; then typings.cmd: @if EXIST "%~dp0\node.exe" ( When I run the command >typings install –verbose I get the error: C:\Angular2\Angular2-GettingStarted-master\APM - Final Updated>typings install --verbose typings ERR! stack Error: 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! If you need help, you may report this error at: The typings directory cannot be created because there is already a file typings in the root directory. When I worked with other Angular2 applications I have never seen the cmd and “shell” files in the roor directory. By the way, I used the settings in the .typingsrc file: { I also tried http instead of https. Each time I got the handshake error. Thanks From: Blake Embrey [mailto:notifications@github.com] Also, the setting should be registryURL - the entry you're doing isn't changing anything. — Need to send me sensitive information via email? Click Here http://www.republicbank.com/home/help/security/secure |
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 |
Hello, Blake
Thanks |
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:
I shall figure out what they mean and fix them. @unional Edit: Change to blocked code for easier reading |
Similar Issue here, any progress or solution? |
@codewreaker What exactly is your issue? This one is closed and resolved if you read it. |
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",
},
"devDependencies": {
"concurrently": "^3.0.0",
"lite-server": "^2.2.2",
"typescript": "^2.0.3",
"typings":"^1.4.0",
},
"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
!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,,/,g')")
case
uname
inCYGWIN) 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
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 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
Please help.
Thank you
Nuren Geodakov
[From
typings -v
]The text was updated successfully, but these errors were encountered: