Skip to content

polymer build is not working for windows 10 and node >= v15  #3548

Open
@my-ashworld

Description

@my-ashworld

Polymer 3.0 fails in windows 10 and node 15, but works in Windows 10 and node 14 if we use bundle option

Steps to regenerate issue :

  1. create new folder example: mkdir my-app
  2. go to my-app folder: cd my-app
  3. run polymer init
  4. select polymer-3-starter-kit from that. [i.e. 3].
  5. update the build attribute of polymer.json as below:
"builds": [
        {
            "name": "es6-bundled",
            "js": {
              "minify": false,
              "compile": false
            },
            "css": {
              "minify": false
            },
            "html": {
              "minify": false
            },
            "bundle": true,
            "addServiceWorker": false,
            "addPushManifest": false
        }
    ]
  1. Run polymer build and check if its working.
    Expected output: single js file with all the dependent code.
  2. then exclude one file from bundle. Update the build attribute of polymer.json as below:
       "builds": [
        {
            "name": "es6-bundled",
            "js": {
              "minify": false,
              "compile": false
            },
            "css": {
              "minify": false
            },
            "html": {
              "minify": false
            },
            "bundle": {
               "excludes": ["./src/my-icon.js"]
             },
            "addServiceWorker": false,
            "addPushManifest": false
        }
    ]
    

[Note: Refer exclude attribute description here => https://polymer-library.polymer-project.org/3.0/docs/tools/polymer-json#overview]
[Note: It should be excludes not exclude https://github.com/Polymer/tools/blob/2f5749613d1ecf5a396345b2888fe620b539e9e6/packages/project-config/src/builds.ts#L90]
7. try to run: polymer build. build fails below error:

error: [cli.main]   Promise rejection: Error: Could not load file:///c%3A/projects/polymer-test/src/my-icons.js (imported by file:///c%3A/projects/polymer-test/src/my-app.js): ENOENT: no such file or directory, open 'file:///c%3A/projects/polymer-test/src/my-icons.js'
error: [cli.main]   Error: Could not load file:///c%3A/projects/polymer-test/src/my-icons.js (imported by file:///c%3A/projects/polymer-test/src/my-app.js): ENOENT: no such file or directory, open 'file:///c%3A/projects/polymer-test/src/my-icons.js'
    at C:\Users\ashlesh.ajay\AppData\Roaming\nvm\v15.0.0\node_modules\polymer-cli\node_modules\rollup\dist\rollup.js:20561:19
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async Promise.all (index 13)
    at async Promise.all (index 95)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions