Open DefteZ opened 5 years ago
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.
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
Dear Andrii,
it looks like the referenced tsconfig.json
file was missing completely, so we just added it with 70dfd823. Thanks for spotting this!
Please let us know whether that solves this issue for you.
With kind regards, Andreas.
Dear Andrii,
do you have any news on this?
With kind regards, Andreas.
Fixed
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"
}
}
After running app using npm run start
.
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.
It is impossible to build java-script stuff.
yarn run build
fails with next log output:info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.