Problem with automatic runtime
Describe the bug
Build Failure with vite and reactjs 18 (no ts) and MS Azure (Oryx)
[commonjs--resolver] /github/workspace/node_modules/@arwes/core/lib/Figure/Figure.component.js: pragma and pragmaFrag cannot be set when runtime is automatic. 1 | "use strict"; | ^ 2 | var __assign = (this && this.__assign) || function () {
probably problem with emotion
To reproduce
Set up with React 18 (and vite) and runtime automatic
Screenshots
Starting to build app with Oryx Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx ---Oryx build logs---
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.20220621.1, Commit: 82ed84f0f3fd3a25ded3029f137601f54e7a1d05, ReleaseTagName: 20220621.1
Build Operation ID: |nrGW9XdlYEQ=.8adbd3bb_ Repository Commit : 787b99c5ab35d9c6c1b6a296b135a0d58a5241bb
Detecting platforms... Detected following platforms: nodejs: 14.19.1 Version '14.19.1' of platform 'nodejs' is not installed. Generating script to install it... Detected the following frameworks: React
Source directory : /github/workspace Destination directory: /bin/staticsites/ss-oryx/app
Downloading and extracting 'nodejs' version '14.19.1' to '/opt/nodejs/14.19.1'... Downloaded in 0 sec(s). Verifying checksum... Extracting contents... performing sha512 checksum for: nodejs... Done in 1 sec(s).
Removing existing manifest file Creating directory for command manifest file if it does not exist Creating a manifest file... Node Build Command Manifest file created.
Using Node version: v14.19.1
Using Npm version: 6.14.16
Running 'npm install --unsafe-perm'...
[email protected] postinstall /github/workspace/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
esbuild@0.15.12 postinstall /github/workspace/node_modules/esbuild node install.js
[email protected] postinstall /github/workspace/node_modules/browser-tabs-lock node scripts/postinstall.js
Thank you for using browser-tabs-lock ( https://github.com/supertokens/browser-tabs-lock ).
This library was created as a part of a larger project, SuperTokens( https://supertokens.io ) - an open source auth solution. You can also check out our other projects on https://github.com/supertokens
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (node_modules/esbuild/node_modules/@esbuild/android-arm): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-android-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"android","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (node_modules/esbuild/node_modules/@esbuild/linux-loong64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"linux","arch":"loong64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-android-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"android","arch":"arm64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-darwin-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-darwin-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-freebsd-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-freebsd-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"freebsd","arch":"arm64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-32): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-arm): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"arm"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"arm64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-mips64le): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"mips64el"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-ppc64le): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"ppc64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-riscv64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"riscv64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-linux-s390x): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux","arch":"s390x"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-netbsd-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"netbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-openbsd-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"openbsd","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-sunos-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"sunos","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-windows-32): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"ia32"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-windows-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"x64"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/esbuild/node_modules/esbuild-windows-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"win32","arch":"arm64"} (current: {"os":"linux","arch":"x64"}) npm WARN @arwes/[email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself. npm WARN @arwes/[email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself. npm WARN @arwes/[email protected] requires a peer of react@^17.0.1 but none is installed. You must install peer dependencies yourself.
added 214 packages from 189 contributors and audited 236 packages in 9.698s
24 packages are looking for funding run
npm fundfor details
found 0 vulnerabilities
Running 'npm run build'...
[email protected] build /github/workspace vite build
vite v3.1.8 building for production... transforming... [commonjs--resolver] /github/workspace/node_modules/@arwes/core/lib/Figure/Figure.component.js: pragma and pragmaFrag cannot be set when runtime is automatic. 1 | "use strict"; | ^ 2 | var __assign = (this && this.__assign) || function () { 3 | __assign = Object.assign || function(t) { 4 | for (var s, i = 1, n = arguments.length; i < n; i++) { file: /github/workspace/node_modules/@arwes/core/lib/index.js error during build: SyntaxError: /github/workspace/node_modules/@arwes/core/lib/Figure/Figure.component.js: pragma and pragmaFrag cannot be set when runtime is automatic. 1 | "use strict"; | ^ 2 | var __assign = (this && this.__assign) || function () { 3 | __assign = Object.assign || function(t) { 4 | for (var s, i = 1, n = arguments.length; i < n; i++) { at File.buildCodeFrameError (/github/workspace/node_modules/@babel/core/lib/transformation/file/file.js:249:12) at NodePath.buildCodeFrameError (/github/workspace/node_modules/@babel/traverse/lib/path/index.js:145:21) at PluginPass.enter (/github/workspace/node_modules/@babel/plugin-transform-react-jsx/lib/create-plugin.js:164:28) at newFn (/github/workspace/node_modules/@babel/traverse/lib/visitors.js:181:21) at NodePath._call (/github/workspace/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/github/workspace/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/github/workspace/node_modules/@babel/traverse/lib/path/context.js:100:31) at TraversalContext.visitQueue (/github/workspace/node_modules/@babel/traverse/lib/context.js:105:16) at TraversalContext.visitSingle (/github/workspace/node_modules/@babel/traverse/lib/context.js:79:19) at TraversalContext.visit (/github/workspace/node_modules/@babel/traverse/lib/context.js:133:19) at traverseNode (/github/workspace/node_modules/@babel/traverse/lib/traverse-node.js:24:17) at traverse (/github/workspace/node_modules/@babel/traverse/lib/index.js:62:34) at transformFile (/github/workspace/node_modules/@babel/core/lib/transformation/index.js:108:29) at transformFile.next () at run (/github/workspace/node_modules/@babel/core/lib/transformation/index.js:35:12) at run.next () at /github/workspace/node_modules/@babel/core/lib/transform-ast.js:30:41 at Generator.next () at step (/github/workspace/node_modules/gensync/index.js:261:32) at /github/workspace/node_modules/gensync/index.js:273:13 at async.call.result.err.err (/github/workspace/node_modules/gensync/index.js:223:11) at /github/workspace/node_modules/gensync/index.js:189:28 at /github/workspace/node_modules/@babel/core/lib/gensync-utils/async.js:84:7 at /github/workspace/node_modules/gensync/index.js:113:33 at step (/github/workspace/node_modules/gensync/index.js:287:14) at /github/workspace/node_modules/gensync/index.js:273:13 at async.call.result.err.err (/github/workspace/node_modules/gensync/index.js:223:11) ✓ 181 modules transformed. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:
vite buildnpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Source: arwes/arwes