从组件类获取意外令牌。寻找有关如何进行的建议。
失败:
? Test suite failed to run
C:/../react-native/jest/mockComponent.js: Unexpected token (20:23)
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If …Run Code Online (Sandbox Code Playgroud) 我用巧克力安装了 ms sql server:
choco install SQLServer2012DeveloperEditionWithSP1 -y -f -source 'http://choco.developers.tcpl.ca/chocolatey' -c "$env:WINDIR\temp"
Run Code Online (Sandbox Code Playgroud)
SQL 似乎已安装并在无法正常工作的 powershell 之外运行良好。我可以看到 sqlps 模块:
Get-Module -listavailable
Run Code Online (Sandbox Code Playgroud)
...
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 1.0 SQLASCMDLETS
Manifest 1.0 SQLPS
Run Code Online (Sandbox Code Playgroud)
但是命令似乎丢失了。我没有 invoke-sqlcmd 等。理论上,如果我安装模块,我应该可以访问它们,但是当我尝试导入模块 sqlps 时,却收到关于没有 sqlserver 驱动器的错误:
PS C:\WINDOWS\system32> Import-Module SQLPS
Set-Location : Cannot find drive. A drive with the name 'SQLSERVER' does not exist.
At C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\SQLPS\SqlPsPostScript.ps1:1 char:1
+ Set-Location SQLSERVER:
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (SQLSERVER:String) [Set-Location], DriveNotFoundException …Run Code Online (Sandbox Code Playgroud)