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

Operation outputFileSync is not allowed to use #477

Closed
Turbo87 opened this issue Mar 30, 2020 · 15 comments
Closed

Operation outputFileSync is not allowed to use #477

Turbo87 opened this issue Mar 30, 2020 · 15 comments
Labels

Comments

@Turbo87
Copy link
Member

Turbo87 commented Mar 30, 2020

After trying to update from v7.1.0 to v8.0.0 we started to see the error below when trying to build our app:

Build Error (SimpleConcatConcat)
Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
=================================================================================
ENV Summary:
  TIME: Mon Mar 30 2020 08:19:01 GMT+0000 (Coordinated Universal Time)
  TITLE: ember
  ARGV:
  - /usr/local/bin/node
  - /builds/qonto/qonto-js/node_modules/.bin/ember
  - exam
  - --split=8
  - --parallel
  EXEC_PATH: /usr/local/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /tmp/yarn--1585556330820-0.7482114818713204
  - /builds/qonto/qonto-js/node_modules/.bin
  - /usr/local/share/.config/yarn/link/node_modules/.bin
  - /builds/qonto/qonto-js/node_modules/.bin
  - /usr/local/share/.config/yarn/link/node_modules/.bin
  - /usr/local/libexec/lib/node_modules/npm/bin/node-gyp-bin
  - /usr/local/lib/node_modules/npm/bin/node-gyp-bin
  - /usr/local/bin/node_modules/npm/bin/node-gyp-bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  PLATFORM: linux x64
  FREEMEM: 7696748544
  TOTALMEM: 16222683136
  UPTIME: 2352
  LOADAVG: 2.4150390625,1.15625,0.99267578125
  CPUS:
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  - Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz - 3000
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.15.0
  - cldr: 33.1
  - http_parser: 2.8.0
  - icu: 62.1
  - modules: 64
  - napi: 3
  - nghttp2: 1.34.0
  - node: 10.15.3
  - openssl: 1.1.0j
  - tz: 2018e
  - unicode: 11.0
  - uv: 1.23.2
  - v8: 6.8.275.32-node.51
  - zlib: 1.2.11
ERROR Summary:
  - broccoliBuilderErrorStack: Error: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
    at Object.handleFs (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/node_modules/broccoli-output-wrapper/dist/index.js:49:15)
    at Concat._doPatchBasedBuild (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:166:17)
    at Concat.build (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:104:19)
    at TransformNodeWrapper.build (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/broccoli/dist/wrappers/transform-node.js:70:39)
    at pipeline.then (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/broccoli/dist/builder.js:118:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  - code: [undefined]
  - codeFrame: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
  - errorMessage: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
        at SimpleConcatConcat
-~- created here: -~-
    at new Plugin (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/node_modules/broccoli-plugin/dist/index.js:45:33)
    at new Concat (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:28:5)
    at module.exports (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/index.js:28:10)
    at Class.treeForBrowserFetch (/builds/qonto/qonto-js/node_modules/ember-fetch/index.js:212:32)
    at Class.treeForVendor (/builds/qonto/qonto-js/node_modules/ember-fetch/index.js:122:28)
    at Class._treeFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/addon.js:668:33)
    at Class.treeFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/addon.js:628:21)
    at project.addons.reduce (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:701:26)
    at Array.reduce (<anonymous>:null:null)
    at EmberApp._addonTreesFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:699:32)
    at EmberApp.addonTreesFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:723:17)
    at EmberApp.getExternalTree (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1180:30)
    at EmberApp.toArray (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1543:12)
    at EmberApp.toTree (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1647:36)
    at module.exports (/builds/qonto/qonto-js/ember-cli-build.js:126:14)
    at Builder.readBuildFile (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:49:14)
    at Builder.setupBroccoliBuilder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:63:22)
    at new Builder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:29:10)
    at BuildTask.run (/builds/qonto/qonto-js/node_modules/ember-cli/lib/tasks/build.js:15:19)
    at Promise.resolve.then (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/command.js:238:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
-~- (end) -~-
  - errorType: Build Error
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
    - treeDir: [undefined]
  - message: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
        at SimpleConcatConcat
-~- created here: -~-
    at new Plugin (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/node_modules/broccoli-plugin/dist/index.js:45:33)
    at new Concat (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:28:5)
    at module.exports (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/index.js:28:10)
    at Class.treeForBrowserFetch (/builds/qonto/qonto-js/node_modules/ember-fetch/index.js:212:32)
    at Class.treeForVendor (/builds/qonto/qonto-js/node_modules/ember-fetch/index.js:122:28)
    at Class._treeFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/addon.js:668:33)
    at Class.treeFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/addon.js:628:21)
    at project.addons.reduce (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:701:26)
    at Array.reduce (<anonymous>:null:null)
    at EmberApp._addonTreesFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:699:32)
    at EmberApp.addonTreesFor (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:723:17)
    at EmberApp.getExternalTree (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1180:30)
    at EmberApp.toArray (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1543:12)
    at EmberApp.toTree (/builds/qonto/qonto-js/node_modules/ember-cli/lib/broccoli/ember-app.js:1647:36)
    at module.exports (/builds/qonto/qonto-js/ember-cli-build.js:126:14)
    at Builder.readBuildFile (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:49:14)
    at Builder.setupBroccoliBuilder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:63:22)
    at new Builder (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/builder.js:29:10)
    at BuildTask.run (/builds/qonto/qonto-js/node_modules/ember-cli/lib/tasks/build.js:15:19)
    at Promise.resolve.then (/builds/qonto/qonto-js/node_modules/ember-cli/lib/models/command.js:238:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
-~- (end) -~-
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: SimpleConcatConcat
  - originalErrorMessage: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
  - stack: Error: Operation outputFileSync is not allowed to use. Allowed operations are readFileSync,existsSync,lstatSync,readdirSync,statSync,writeFileSync,appendFileSync,rmdirSync,mkdirSync,unlinkSync,symlinkOrCopySync,symlinkSync,utimesSync
    at Object.handleFs (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/node_modules/broccoli-output-wrapper/dist/index.js:49:15)
    at Concat._doPatchBasedBuild (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:166:17)
    at Concat.build (/builds/qonto/qonto-js/node_modules/ember-fetch/node_modules/broccoli-concat/concat.js:104:19)
    at TransformNodeWrapper.build (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/broccoli/dist/wrappers/transform-node.js:70:39)
    at pipeline.then (/builds/qonto/qonto-js/node_modules/ember-cli/node_modules/broccoli/dist/builder.js:118:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)
=================================================================================

This is likely a downstream issue in one of the broccoli dependencies, but I thought I should open it here too, because the ember-fetch update triggered this for us.

@stefanpenner @SparshithNR any clue what might be causing this?

@Turbo87 Turbo87 added the bug label Mar 30, 2020
@stefanpenner
Copy link
Collaborator

cc @SparshithNR

@SparshithNR
Copy link

SparshithNR commented Mar 30, 2020

Can you check the version of broccoli-output-wrapper? outputFileSync is added in v3.2.1.

Copy link
Member

rwjblue commented Mar 30, 2020

I think this is basically what @bendemboski describes in broccolijs/broccoli-plugin#50.

@kpfefferle
Copy link

I can confirm that for our app, upgrading broccoli-output-wrapper sub-dependency to 3.2.1 fixes the error 👍

@Turbo87
Copy link
Member Author

Turbo87 commented Mar 30, 2020

@stefanpenner why did you close the issue? is it fixed?

@stefanpenner
Copy link
Collaborator

@Turbo87 yes it is fixed (broccoli-output-wrapper 3.2.0 -> 3.2.1) , please be sure that your lock file isn't retaining an old version of broccoli-output-wrapper

Copy link
Member

rwjblue commented Mar 30, 2020

@stefanpenner - This is still pretty tricky and easy to cause folks to stumble, I think we should land and release broccolijs/broccoli-plugin#50 then bump our minimum version on broccoli-plugin here.

@xg-wang
Copy link
Member

xg-wang commented Mar 30, 2020

FWIW this is the dependency chain: ember-fetch -> broccoli-concat|broccoli-merge-trees -> broccoli-plugin -> broccoli-output-wrapper

❯ yarn why broccoli-output-wrapper
yarn why v1.21.1
[1/4] 🤔  Why do we have the module "broccoli-output-wrapper"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "broccoli-output-wrapper@2.0.0"
info Reasons this module exists
   - "broccoli-merge-trees#broccoli-plugin" depends on it
   - Hoisted from "broccoli-merge-trees#broccoli-plugin#broccoli-output-wrapper"
   - Hoisted from "ember-cli-htmlbars#broccoli-plugin#broccoli-output-wrapper"
=> Found "broccoli-concat#broccoli-output-wrapper@3.2.1"
info Reasons this module exists
   - "broccoli-concat#broccoli-plugin" depends on it
   - Hoisted from "broccoli-concat#broccoli-plugin#broccoli-output-wrapper"

@stefanpenner
Copy link
Collaborator

broccoli-plugin released as v4.0.2 🎉

For those running into this issue, please ensure your dependencies are updated. Re-roll your lockfile, and all should be back to normal.

@Turbo87
Copy link
Member Author

Turbo87 commented Mar 30, 2020

I agree with @rwjblue. It looks like the actual issue here is an outdated dependency specification somewhere. Asking people to cycle their lockfiles is just hiding the root cause 😉

@stefanpenner
Copy link
Collaborator

stefanpenner commented Mar 30, 2020

@Turbo87 sorta, new users are unaffected. Users who don't update dependencies, will never see the fix. They must update dependencies.

I'll be sure to update broccoli-concat and merge-trees as well, but anything else in the longtail is just "to bad".

Unfortunately, this is a trade-off folks using lockfiles will get, using a lockfile then requires a level of lockfile hygiene or sadness will occur.

@kpfefferle
Copy link

@stefanpenner Isn't it also the responsibility of library maintainers to specify versions of their dependencies that actually work with their library? If ember-fetch@8.0.0 is using features that require broccoli-output-wrapper@3.2.1 (and does NOT work with broccoli-output-wrapper@3.2.0), then shouldn't it's own dependency list specify dependency versions that are compatible? 🤔

@stefanpenner
Copy link
Collaborator

stefanpenner commented Mar 30, 2020

@kpfefferle not really ember-fetch is responsible to specify the versions of it's dependencies, known to work at the time of the authoring. If a transitive happens to break, and then fix itself it's a gray area. As the shear volume of transitive dependencies patch versions due to one break or another, would result in these libraries releasing near daily, that simply isn't possible to support or commit too.

@Turbo87
Copy link
Member Author

Turbo87 commented Mar 30, 2020

FWIW I disagree. I very much think that it is the responsibility of the libraries to declare correct dependency constraints.

@stefanpenner
Copy link
Collaborator

@Turbo87 sounds fair, I welcome additional contributions to help keep up with that work load.

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

6 participants