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

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

Open
my-ashworld opened this issue Feb 22, 2021 · 1 comment
Open

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

my-ashworld opened this issue Feb 22, 2021 · 1 comment
Labels

Comments

@my-ashworld
Copy link

my-ashworld commented Feb 22, 2021

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)
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant