Comments (12)
for some reason npm install typescript --save-dev
did the trick for me, can't say i can explain why..
from typescript-tools.
@mperdikeas , do u have typescript
installed ? if not do
npm install -g typescript
from typescript-tools.
Having a globally installed tsc
is not the same as having a locally installed, importable typescript
module. node
is complaining about the latter. Please read the instructions again - you're missing an install step.
from typescript-tools.
In some case, you need to have typescript installed locally when it is used from an external module. (e.g. tsc-watch) so:
npm install typescript --save-dev
or
npm install typescript --save
depending from your needs.
from typescript-tools.
I was having the same issue and npm install typescript
fixed it.
from typescript-tools.
PS. if you really want to run bin/tss
, instead of a global tss
, you need to run npm install
in typescript-tools
, not npm install -g
from typescript-tools.
npm install typescript-tools --save-dev
fixed my issue
from typescript-tools.
can anybody please suggest a soultion for this?
Context : I upgraded a project from angular version 5.2 to 11 and typescript is installed . im using node version 11.2. and im still facing the issue- throw new Error('Could not find local "typescript" package.'
Kindly help
from typescript-tools.
See the following trace:
$ sudo npm install -g typescript
npm http GET https://registry.npmjs.org/typescript
npm http 304 https://registry.npmjs.org/typescript
/home/mperdikeas/.node_modules_global/bin/tsserver -> /home/mperdikeas/.node_modules_global/lib/node_modules/typescript/bin/tsserver
/home/mperdikeas/.node_modules_global/bin/tsc -> /home/mperdikeas/.node_modules_global/lib/node_modules/typescript/bin/tsc
[email protected] /home/mperdikeas/.node_modules_global/lib/node_modules/typescript
mperdikeas@beorn:~/typescript-tools/bin#
$ echo $?
0
mperdikeas@beorn:~/typescript-tools/bin#
$ ./tss
module.js:340
throw err;
^
Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/mperdikeas/typescript-tools/bin/tss.js:6:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
from typescript-tools.
I have installed typescript.
Still i am facing the issue.
Error: Cannot find module 'D:\GTMAUTOMATION\node_modules\typescript\bin\tsc'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] pretest: tsc
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] pretest 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! C:\Users\495211\AppData\Roaming\npm-cache_logs\2019-08-22T10_01_13_284Z-debug.log
PS D:\GTMAUTOMATION> npm install typescript --save
npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline?
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/typescript failed, reason: getaddrinfo ENOTFOUND proxy.company.com proxy.company.com:8080
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
from typescript-tools.
for some reason
npm install typescript --save-dev
did the trick for me, can't say i can explain why..
from typescript-tools.
I have upgraded my Angular 8 project to Angular 11 and I am start facing this issue with my server.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
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 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Ambuj Khanna\Projects\angular_mgration_R&D\STAConsole\server\node_modules\.bin;C:\Python39\Scripts\;C:\Python39\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\SafeNet\Authentication\SAC\x64;C:\Program Files\SafeNet\Authentication\SAC\x32;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\PuTTY\;C:\Program Files\nodejs\;C:\Users\10064213\AppData\Local\Microsoft\WindowsApps;C:\Users\10064213\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\10064213\AppData\Local\GitHubDesktop\bin;C:\Users\10064213\.dotnet\tools;C:\Users\10064213\AppData\Roaming\npm
9 verbose lifecycle [email protected]~start: CWD: C:\Ambuj Khanna\Projects\angular_mgration_R&D\STAConsole\server
10 silly lifecycle [email protected]~start: Args: [ '/d /s /c', 'gulp start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `gulp start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1022:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Ambuj Khanna\Projects\angular_mgration_R&D\STAConsole\server
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.22.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `gulp start`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
from typescript-tools.
Related Issues (20)
- How I can configure it to target ES5 when checking for errors? HOT 5
- add support for getEmitOutput HOT 1
- add configuration support HOT 1
- TSSreferences does not show contents of line in location list HOT 1
- Parameter completion HOT 5
- tss 1.4: test for undefined instead of null HOT 4
- Vim: Showing the file structure in another window HOT 4
- split tss and vim into separate repos? HOT 5
- Angular.d.ts seems to break completion. HOT 3
- Doc: showError output HOT 4
- Error detected while processing function TSSdef HOT 2
- Error if non-existing files are listed in tsconfig.json
- [email protected] is now in npm, please upload typescript-tools1.5 HOT 7
- Random crash HOT 2
- TS2339 error mismatch between tss and tsc HOT 2
- Following Angular2's quickstart - can't find the tsconfig.json (or doesn't read it) HOT 1
- upgrade to the latest typescript HOT 1
- tsconfig.json parsing
- Publish? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-tools.