Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS18002: The 'files' list in config file 'tsconfig.json' is empty. #19

Open
DefteZ opened this issue Jun 5, 2019 · 7 comments
Open

Comments

@DefteZ
Copy link
Contributor

DefteZ commented Jun 5, 2019

It is impossible to build java-script stuff.
yarn run build fails with next log output:

[../../../patzilla-ui/vendor/widget/raty/jquery.raty.js] /opt/Patzilla/patzilla-ui/vendor/widget/raty/jquery.raty.js 17.5 KiB {app-standalone} {app-embedded} [depth 6] [built]
    + 372 hidden modules

ERROR in [tsl] ERROR
      TS18002: The 'files' list in config file 'tsconfig.json' is empty.
 @ /opt/Patzilla/patzilla-ui/navigator/app/document/document-controller.js 5:15-64
 @ /opt/Patzilla/patzilla-ui/navigator/app/document/index.js
 @ /opt/Patzilla/patzilla-ui/navigator/boot/loader.js
 @ /opt/Patzilla/patzilla-ui/navigator/boot/standalone.js
 @ multi /opt/Patzilla/patzilla-ui/navigator/boot/standalone

ERROR in /opt/Patzilla/patzilla-ui/navigator/components/nataraja/index.ts
Module build failed (from /opt/Patzilla/node_modules/ts-loader/index.js):
Error: error while parsing tsconfig.json
    at Object.loader (/opt/Patzilla/node_modules/ts-loader/dist/index.js:19:18)
 @ /opt/Patzilla/patzilla-ui/navigator/app/document/document-controller.js 5:15-64
 @ /opt/Patzilla/patzilla-ui/navigator/app/document/index.js
 @ /opt/Patzilla/patzilla-ui/navigator/boot/loader.js
 @ /opt/Patzilla/patzilla-ui/navigator/boot/standalone.js
 @ multi /opt/Patzilla/patzilla-ui/navigator/boot/standalone
error Command failed with exit code 2.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@amotl
Copy link
Member

amotl commented Jun 5, 2019

Dear Andrii,

thanks for writing in and reporting this issue to us. From reading about ts-loader in the stacktrace (thanks for that!), we conclude this is most probably related to the recent addition of TypeScript to the frontend.

With kind regards,
Andreas.

@DefteZ
Copy link
Contributor Author

DefteZ commented Jun 6, 2019

steps to reproduce:

git clone https://github.com/ip-tools/ip-navigator.git
cd ip-navigator/
git checkout 22a7c74cfe2377335ae34df0abc1e642a5595355
virtualenv --python=python2 .venv27 && source .venv27/bin/activate
pip install -e . 
pip install nodeenv
nodeenv --node=10.15.3 .nodeenv
source .nodeenv/bin/activate && npm install -g yarn && yarn install
yarn run build

@amotl
Copy link
Member

amotl commented Jun 6, 2019

Dear Andrii,

it looks like the referenced tsconfig.json file was missing completely, so we just added it with 70dfd82. Thanks for spotting this!

Please let us know whether that solves this issue for you.

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Jun 10, 2019

Dear Andrii,

do you have any news on this?

With kind regards,
Andreas.

@DefteZ
Copy link
Contributor Author

DefteZ commented Jun 11, 2019

Fixed

@DefteZ DefteZ closed this as completed Jun 11, 2019
@rupuengg
Copy link

rupuengg commented May 25, 2023

I am still facing the same issue.

tsconfig.json

{
  "include": [
    "patzilla-ui"
  ],
  "compileOnSave": true,
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "rootDir": "./patzilla-ui",
    "baseUrl": "./patzilla-ui",
    "lib": [
      "dom",
      "es2015",
      "es2016"
    ],
    "declaration": false,
    "allowSyntheticDefaultImports": true,
    "inlineSourceMap": false,
    "sourceMap": true,
    "jsx": "react",
    "noEmitOnError": false,
    "emitDecoratorMetadata": false,
    "experimentalDecorators": true,
    "noImplicitReturns": true,
    "noImplicitThis": false,
    "noImplicitUseStrict": false,
    "noImplicitAny": false,
    "noUnusedLocals": false,
    "strictNullChecks": true,
    "moduleResolution": "node",
    "esModuleInterop": true
  }
}

webpacl.config.js

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// const REACT_APP_ENV = process.env.REACT_APP_ENV;

module.exports = {
  mode: 'delelopment',
  entry: './src/main.tsx',
  devtool: 'inline-source-map',
  output: {
    path: path.join(__dirname, '/dist'),
    filename: 'bundle.js'
  },
  devServer: {
    static: './dist'
  },
  module: {
    rules: [
      {
        use: ['babel-loader'],
        test: /\.(js\jsx)$/,
        exclude: /node_modules/
      },
      {
        test: /\.tsx?$/,
        use: 'ts-loader',
        exclude: /node_modules/
      },
      {
        test: /\.s?css$/,
        use: ['style-loader', 'css-loader', 'sass-loader']
      }
    ]
  },
  resolve: {
    extensions: [
      '.tsx', '.ts', '.js'
    ]
  },
  target: ['web', 'es5'],
  plugins: [
    new HtmlWebpackPlugin({
      template: './public/index.html'
    })
  ]
};

package.json

{
  "name": "pwatlas",
  "version": "1.0.0",
  "description": "pwatlas",
  "main": "main.js",
  "scripts": {
    "start": "webpack-dev-server --open --mode development --hot",
    "build": "webpack --mode production",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Rupendra",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.21.8",
    "@babel/preset-env": "^7.21.5",
    "@babel/preset-react": "^7.18.6",
    "@types/node": "^20.2.3",
    "babel-loader": "^9.1.2",
    "html-webpack-plugin": "^5.5.1",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "ts-loader": "^9.4.2",
    "typescript": "^5.0.4",
    "webpack": "^5.83.1",
    "webpack-cli": "^5.1.1",
    "webpack-dev-server": "^4.15.0"
  },
  "dependencies": {
    "@types/react": "^18.2.6",
    "@types/react-dom": "^18.2.4"
  }
}

Problem

After running app using npm run start.
image

@amotl amotl reopened this May 25, 2023
@amotl amotl self-assigned this May 25, 2023
@amotl
Copy link
Member

amotl commented May 25, 2023

Dear Rupendra,

thank you for writing in. I am not sure if this is the right spot. Are you sure you are using PatZilla? Your package.json refers to a project called pwatlas. Please clarify how this is related to PatZilla.

Other than this, PatZilla's instructions how to setup a development sandbox can be found at 1. Please let me know if you observe any specific problems following the steps outlined there.

With kind regards,
Andreas.

Footnotes

  1. https://docs.ip-tools.org/patzilla/install/sandbox.html

@amotl amotl removed their assignment Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants