-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
yarn install during local development fails due to @vscode\sqlite3 #10194
Comments
Yeah you'll need build tooling present (visual studio in your case) to be able to use You'll see that the main repo switched over to using Check out what we did in that PR. Your repo should also be able to do the same config change and see if that solves your problems. backend:
database:
- client: sqlite3
+ client: better-sqlite3 |
Now I see the below error. [5/5] Building fresh packages... Error: Cannot find module 'C:\Users\XXXXXX\Downloads\node-v16.13.0-win-x64\node_modules\npm\bin\npm-cli.js' Error: Cannot find module 'C:\Users\XXXXXX\Downloads\node-v16.13.0-win-x64\node_modules\npm\bin\npm-cli.js' |
I switched to nodejs 16.14.0 [5/5] Building fresh packages...
gyp info it worked if it ends with ok |
Did you follow the instructions in there? |
Looking at the commit efc73db, did all the changes mentioned there, but still no luck |
No I meant, did you follow the instructions in the error message you pasted? |
It is asking to install visual studio. Is this really mandatory? |
In linux, it may ask for a different set of dependencies; usually |
I found this guide too. https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/troubleshooting.md |
None of the solutions seem to be working either for windows or linux for us. Have raised issue here WiseLibs/better-sqlite3#777 |
Oh I see on the last one that the actual error was operation not permitted (EPERM) on the project file it tried to build. Are you using some form of odd mounted directories, readonly file systems, or antivirus software that interferes with stuff like this? |
In our organization when we install softwares like MS studio, it goes under program files, and that is readonly. Else the other option is for us to put the MS studio where it has read-write on mount and use npm config set msvs_version YYY By doing this it may work in windows. But for linux it appears we need GCC compiler, which isn't in our OS build and not sure whether we can install the build-essentials as well. I will come back on this when I get more info |
But this is within your own repo.
added some newlines for readability |
Ah yes that is true. I am not sure why it is saying operation not permitted, as that is a read-write mount. |
Looks like for windows symlink doesn't work. |
Alright. Is this in WSL or not? Might be worth using that |
We are using gitbash. In our org using custom tools like WSL is not allowed. |
Unfortunately I think you are out of luck in this instance, in that case. Both this package and the vscode one require compilation steps upon install, and they don't come with windows binaries so the build toolchains and a read-write filesystem is necessary while developing and building the project - IF using sqlite. The easiest path forward for you might be to use the postgres driver instead, both for local development and production. That might be a viable option, and worth trying. I'll close this as inactionable for now, I hope that's OK. If you find any workaround or alternative driver for sqlite that works in your circumstances, we would passionately like to hear about it :/ |
We use postgres and not sqlite in app-config.yaml as below and comment out the sqlite option. But, how do we make sure that the entire sqlite engine isn't being used at all while doing "yarn install"? |
Upgraded to the tag v0.70.1 and after which performed "yarn install" on the local development environment but fails with the below error
[5/5] Building fresh packages...
error C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@vscode\sqlite3: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@vscode\sqlite3
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@16.13.0 | win32 | x64
gyp info find Python using Python version 3.8.3 found at "C:\Program Files\Anaconda3\python.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack at C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack at C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@npmcli\run-script\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Users\XXXXXX\Downloads\node-v16.13.0-win-x64\node.exe" "C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules\@npmcli\run-script\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\XXXXXX\GIT_REPOSITORY_GA\backstage-app\node_modules@vscode\sqlite3
gyp ERR! node -v v16.13.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
The text was updated successfully, but these errors were encountered: