Giter Club home page Giter Club logo

Comments (9)

FlorianRappl avatar FlorianRappl commented on June 15, 2024

I've not seen it - I would recommend trying to use a different version of Node, e.g., v16.

Also this seems to be the recommendation from others, e.g., on SO: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

from piral-microfrontend-demo.

FlorianRappl avatar FlorianRappl commented on June 15, 2024

Alternatively, you can replace piral-cli-webpack with piral-cli-webpack5. This issue seems to be specific to Webpack v4 and is fixed in Webpack v5.

from piral-microfrontend-demo.

MirtoBusico avatar MirtoBusico commented on June 15, 2024

Well trying to update to piral-cli-webpack5 (in app-scall directory issued "npm install piral-webpack5") I updated package.json to:

{
  "name": "app-shell",
  "version": "1.0.0",
  "description": "The App Shell - application to be deployed.",
  "keywords": [
    "piral"
  ],
  "dependencies": {
    "piral": "0.14.0",
    "piral-cli-webpack5": "^0.14.23",
    "piral-containers": "0.14.0"
  },
  "scripts": {
    "start": "piral debug",
    "build": "piral build"
  },
  "app": "./src/index.html",
  "main": "lib/index.js",
  "pilets": {
    "files": [
      ".editorconfig",
      "prettier.config.js"
    ],
    "externals": [],
    "devDependencies": {},
    "scripts": {}
  },
  "devDependencies": {
    "@types/node": "latest",
    "@types/react": "latest",
    "@types/react-dom": "latest",
    "@types/react-router": "latest",
    "@types/react-router-dom": "latest",
    "piral-cli": "0.14.0",
    "piral-cli-webpack5": "^0.14.23",
    "typescript": "latest"
  }
}

But now I receive the error "Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string."

sysop@m01serv:~/software/test/PIRAL/piral-microfrontend-demo/app-shell$ npm run build

> [email protected] build
> piral build

Bundle emulator ...
asset index.b044c8.js 1.61 MiB [emitted] [immutable] (name: main) 1 related asset
asset index.html 318 bytes [emitted]
orphan modules 989 KiB [orphan] 74 modules
runtime modules 2.37 KiB 7 modules
modules by path ./node_modules/ 1.44 MiB 165 modules
modules by path ./src/ 9.76 KiB
  ./src/page.css 357 bytes [built] [code generated]
  ./src/index.tsx 771 bytes [built] [code generated]
  ./node_modules/css-loader/dist/cjs.js!./src/page.css 8.66 KiB [built] [code generated]
webpack 5.72.0 compiled successfully in 1285 ms
🚨  [0076] Could not create the declaration in "/home/sysop/software/test/PIRAL/piral-microfrontend-demo/app-shell". Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
✨  Emulator package available in "/home/sysop/software/test/PIRAL/piral-microfrontend-demo/app-shell/dist/emulator".
Bundle release ...
asset index.9982b0.js 232 KiB [emitted] [immutable] [minimized] (name: main) 1 related asset
asset main.bf2594.css 2.34 KiB [emitted] [immutable] [minimized] (name: main) 1 related asset
asset index.html 359 bytes [emitted]
Entrypoint main 234 KiB (769 KiB) = main.bf2594.css 2.34 KiB index.9982b0.js 232 KiB 2 auxiliary assets
orphan modules 345 KiB [orphan] 184 modules
runtime modules 2.25 KiB 6 modules
cacheable modules 407 KiB (javascript) 3.04 KiB (css/mini-extract)
  modules by path ./node_modules/ 212 KiB 19 modules
  modules by path ./src/ 195 KiB (javascript) 3.04 KiB (css/mini-extract)
    ./src/page.css 50 bytes [built] [code generated]
    ./src/index.tsx + 110 modules 195 KiB [built] [code generated]
    css ./node_modules/css-loader/dist/cjs.js!./src/page.css 3.04 KiB [built] [code generated]
webpack 5.72.0 compiled successfully in 3195 ms
✨  Files for publication available in "/home/sysop/software/test/PIRAL/piral-microfrontend-demo/app-shell/dist/release".
sysop@m01serv:~/software/test/PIRAL/piral-microfrontend-demo/app-shell$

Any hint?

from piral-microfrontend-demo.

FlorianRappl avatar FlorianRappl commented on June 15, 2024

I'd ignore this. It just means that the declaration could not be build. This is a bug that Node 17 dropped support for the "exports" field trailing slash notation. It only accepts the star notation now.

As you see the thing builds and it should also work when you run it.

from piral-microfrontend-demo.

MirtoBusico avatar MirtoBusico commented on June 15, 2024

Well one step ahead.
For team-blue I had to issue

  • npm i
  • npm install piral-cli-webpack5
  • change package.json
  • npm audit fix --force
  • npm run build
  • npm run upload

Now trying to do the same for the other two piled and test the application

from piral-microfrontend-demo.

MirtoBusico avatar MirtoBusico commented on June 15, 2024

Well, another step ahead.

I was able to build and upload the three pilets.

Issuing "./run.sh" in the project directory I have:

An empty app-shell with a console error
ksnip_20220504-155331

A feed service showing the three pilets
ksnip_20220504-155413

and a kras server (I don't know what it is) showing
ksnip_20220504-155451

What can I do?

from piral-microfrontend-demo.

FlorianRappl avatar FlorianRappl commented on June 15, 2024

The problem is already in your build process. I am not sure what you did - because for me it just works - but since process is not defined it seems you work with a custom or invalid webpack configuration.

Make sure to use the right version.

Maybe just pull from main (I've seen you installed some bundler, but a version that is not aligned with the piral-cli) and restart from there.

from piral-microfrontend-demo.

MirtoBusico avatar MirtoBusico commented on June 15, 2024

Well, for the first try:

Started a local feed service

Then, for every team:

  • npm i
    
  • npm install piral-cli-webpack5
    
  • change package.json
    
  • npm audit fix --force
    
  • npm run build
    
  • npm run upload
    

Verified that the pilets were loaded

Then started the layout with npm start

For the second try I just ran the "./run.sh" in the project home

The result was the same: an empty red frame

Now I'll verify the entire process

from piral-microfrontend-demo.

FlorianRappl avatar FlorianRappl commented on June 15, 2024

What I did (and I tried it on 2 machines, so this just works):

  1. Clone the repo
  2. Run install.sh
  3. Run run.sh

All working. I'll close this one.

from piral-microfrontend-demo.

Related Issues (7)

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.