Giter VIP home page Giter VIP logo

Comments (4)

sn0wcat avatar sn0wcat commented on May 31, 2024

The source code is written in typescript which needs to be transpiled down to javascript before it is published. The tsc call is calling the locally installed typescript compiler.

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html

`
If there are no parameters the tsc looks for local tsconfig.json parameter.

If the "files" and "include" are both left unspecified, the compiler defaults to including all TypeScript (.ts, .d.ts and .tsx) files in the containing directory and subdirectories except those excluded using the "exclude" property. JS files (.js and .jsx) are also included if allowJs is set to true. If the "files" or "include" properties are specified, the compiler will instead include the union of the files included by those two properties. Files in the directory specified using the "outDir" compiler option are excluded as long as "exclude" property is not specified.
`

so tsc and tsc -w are just compiling all .ts files in the project.

Btw, for your installation please use the published packages from npm.

from node-red-contrib-mindconnect.

sn0wcat avatar sn0wcat commented on May 31, 2024

Btw:

$ npm pack                                                                                                        
                                                                                                                  
> @mindconnect/[email protected] prepare C:\git\github\node-red-contrib-mindconnect            
> tsc                                                                                                             
                                                                                                                  
npm notice                                                                                                        
npm notice package: @mindconnect/[email protected]                                             
npm notice === Tarball Contents ===                                                                               
npm notice 2.4kB  package.json                                                                                    
npm notice 1.8kB  CHANGELOG.md                                                                                    
npm notice 3.2kB  CODE_OF_CONDUCT.md                                                                              
npm notice 1.5kB  CONTRIBUTING.md                                                                                 
npm notice 1.1kB  LICENSE.md                                                                                      
npm notice 8.5kB  README.md                                                                                       
npm notice 4.9kB  src/mindconnect-schema.js                                                                       
npm notice 3.4kB  src/mindconnect-schema.js.map                                                                   
npm notice 12.5kB src/mindconnect.html                                                                            
npm notice 12.1kB src/mindconnect.js                                                                              
npm notice 9.3kB  src/mindconnect.js.map                                                                          
npm notice 782B   src/mindsphere.css                                                                              
npm notice 6.9kB  test/mindconnect-node.spec.js                                                                   
npm notice 6.3kB  test/mindconnect-node.spec.js.map                                                               
npm notice === Tarball Details ===                                                                                
npm notice name:          @mindconnect/node-red-contrib-mindconnect                                               
npm notice version:       3.4.0-1                                                                                 
npm notice filename:      mindconnect-node-red-contrib-mindconnect-3.4.0-1.tgz                                    
npm notice package size:  18.0 kB                                                                                 
npm notice unpacked size: 74.7 kB                                                                                 
npm notice shasum:        5fa4a3a623f7a0f233edc904bb098af1b46c304b                                                
npm notice integrity:     sha512-od2BVfLgqiXUI[...]3Q85ONpU3go4g==                                                
npm notice total files:   14                                                                                      
npm notice                                                                                                        
mindconnect-node-red-contrib-mindconnect-3.4.0-1.tgz                                                              

So how are you getting tsc help? @jan-kiszka

from node-red-contrib-mindconnect.

jan-kiszka avatar jan-kiszka commented on May 31, 2024

Thanks for clarifying how it is normally working. Could it be that you forgot to package that tsconfig.json? It's not part of a local re-installation:

# npm install --global-style @mindconnect/node-red-contrib-mindconnect
[...]
# ls node_modules/@mindconnect/node-red-contrib-mindconnect/
CHANGELOG.md  CODE_OF_CONDUCT.md  CONTRIBUTING.md  LICENSE.md  node_modules  package.json  README.md  src
# cd node_modules/@mindconnect/node-red-contrib-mindconnect
# npm install --only=dev
npm WARN deprecated @types/[email protected]: This is a stub types definition. handlebars provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/[email protected]: This is a stub types definition for ajv (https://github.com/epoberezkin/ajv). ajv provides its own type definitions, so you don't need @types/ajv installed!
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: Mailparser versions older than v2.3.0 are deprecated
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: This project is unmaintained
npm WARN deprecated [email protected]: This project is unmaintained

> [email protected] install /data/tmp/modules/node_modules/@mindconnect/node-red-contrib-mindconnect/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Completion callback never invoked! 
node-pre-gyp ERR! System Linux 4.12.14-lp150.12.45-default
node-pre-gyp ERR! command "/usr/bin/node8" "/data/tmp/modules/node_modules/@mindconnect/node-red-contrib-mindconnect/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /data/tmp/modules/node_modules/@mindconnect/node-red-contrib-mindconnect/node_modules/bcrypt
node-pre-gyp ERR! node -v v8.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>

> [email protected] postinstall /data/tmp/modules/node_modules/@mindconnect/node-red-contrib-mindconnect/node_modules/nodemon
> node bin/postinstall || exit 0


> @mindconnect/[email protected] prepare /data/tmp/modules/node_modules/@mindconnect/node-red-contrib-mindconnect
> tsc

Version 3.3.3333
Syntax:   tsc [options] [file...]

Examples: tsc hello.ts
          tsc --outFile file.js file.ts
          tsc @args.txt
          tsc --build tsconfig.json

Options:
 -h, --help                                         Print this message.
 -w, --watch                                        Watch input files.
 --pretty                                           Stylize errors and messages using color and context (experimental).
 --all                                              Show all compiler options.
 -v, --version                                      Print the compiler's version.
 --init                                             Initializes a TypeScript project and creates a tsconfig.json file.
 -p FILE OR DIRECTORY, --project FILE OR DIRECTORY  Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
 -b, --build                                        Build one or more projects and their dependencies, if out of date
 -t VERSION, --target VERSION                       Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.
 -m KIND, --module KIND                             Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.
 --lib                                              Specify library files to be included in the compilation.
                                                      'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'esnext' 'dom' 'dom.iterable' 'webworker' 'webworker.importscripts' 'scripthost' 'es2015.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellknown' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'es2017.typedarrays' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 
 --allowJs                                          Allow javascript files to be compiled.
 --jsx KIND                                         Specify JSX code generation: 'preserve', 'react-native', or 'react'.
 -d, --declaration                                  Generates corresponding '.d.ts' file.
 --declarationMap                                   Generates a sourcemap for each corresponding '.d.ts' file.
 --sourceMap                                        Generates corresponding '.map' file.
 --outFile FILE                                     Concatenate and emit output to single file.
 --outDir DIRECTORY                                 Redirect output structure to the directory.
 --removeComments                                   Do not emit comments to output.
 --noEmit                                           Do not emit outputs.
 --strict                                           Enable all strict type-checking options.
 --noImplicitAny                                    Raise error on expressions and declarations with an implied 'any' type.
 --strictNullChecks                                 Enable strict null checks.
 --strictFunctionTypes                              Enable strict checking of function types.
 --strictBindCallApply                              Enable strict 'bind', 'call', and 'apply' methods on functions.
 --strictPropertyInitialization                     Enable strict checking of property initialization in classes.
 --noImplicitThis                                   Raise error on 'this' expressions with an implied 'any' type.
 --alwaysStrict                                     Parse in strict mode and emit "use strict" for each source file.
 --noUnusedLocals                                   Report errors on unused locals.
 --noUnusedParameters                               Report errors on unused parameters.
 --noImplicitReturns                                Report error when not all code paths in function return a value.
 --noFallthroughCasesInSwitch                       Report errors for fallthrough cases in switch statement.
 --types                                            Type declaration files to be included in compilation.
 --esModuleInterop                                  Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
 @<file>                                            Insert command line options and files from a file.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 6

added 565 packages from 731 contributors and audited 3460 packages in 27.004s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

from node-red-contrib-mindconnect.

jan-kiszka avatar jan-kiszka commented on May 31, 2024

Oh, and I have to repack nodes because I need to work around that non-existing offline installation support of npm. A huge mess.

from node-red-contrib-mindconnect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.