Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Microsoft.DotNet.Props was not found #456

Closed
ManuelDeLeon opened this issue Nov 22, 2016 · 22 comments
Closed

Microsoft.DotNet.Props was not found #456

ManuelDeLeon opened this issue Nov 22, 2016 · 22 comments

Comments

@ManuelDeLeon
Copy link

Windows 10 x64
node v6.7.0
npm v4.0.2
.NET Core 1.0.1 tools Preview 2
.NET Core 1.1 SDK
tsc v2.0.10 (same results with v1.8)
VS Code
VS2015
VS2017

I get the following error when I run the React generator (yarn v0.17.8):

C:\MyFiles\ViewModel\repros\wReact>yo
? 'Allo ManuelDeLeon! What would you like to do? Aspnetcore Spa

Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo aspnetcore-spa


     _-----_     ╭──────────────────────────╮
    |       |    │  Welcome to the ASP.NET  │
    |--(o)--|    │   Core Single-Page App   │
   `---------´   │        generator!        │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? Framework React
? Your project name wReact
Will restore NPM dependencies using 'yarn' installed at C:\Users\manuel.de.leon\AppData\Roaming\npm\yarn.CMD


I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.


   create package.json
   create .babelrc
   create appsettings.json
   create ClientApp\boot.tsx
   create ClientApp\components\Counter.tsx
   create ClientApp\components\FetchData.tsx
   create ClientApp\components\Home.tsx
   create ClientApp\components\Layout.tsx
   create ClientApp\components\NavMenu.tsx
   create ClientApp\css\site.css
   create ClientApp\routes.tsx
   create Controllers\HomeController.cs
   create Controllers\SampleDataController.cs
   create Dockerfile
   create package.json.tmp
   create Program.cs
   create project.json
   create README.md
   create Startup.cs
   create .gitignore
   create node_modules\_placeholder.txt
   create WReact.xproj
   create tsconfig.json
   create Views\_ViewImports.cshtml
   create Views\_ViewStart.cshtml
   create Views\Home\Index.cshtml
   create Views\Shared\_Layout.cshtml
   create Views\Shared\Error.cshtml
   create web.config
   create webpack.config.js
   create webpack.config.vendor.js
   create wwwroot\dist\_placeholder.txt
   create wwwroot\favicon.ico
yarn install v0.17.8
info No lockfile found.
warning WReact@0.0.0: No license field
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@types%2freact-router: self signed certificate in certificate chain".
info If you think this is a bug, please open a bug report with the information provided in "C:\\MyFiles\\ViewModel\\repros\\wReact\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
C:\MyFiles\ViewModel\repros\wReact\WReact.xproj(8,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
The system cannot find the path specified.
The system cannot find the path specified.

     _-----_     ╭───────────────────────╮
    |       |    │      Bye from us!     │
    |--(o)--|    │       Chat soon.      │
   `---------´   │      Yeoman team      │
    ( _´U`_ )    │    http://yeoman.io   │
    /___A___\   /╰───────────────────────╯
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

By the way, with yarn v0.16.1 I get the following set of errors:

C:\MyFiles\ViewModel\repros\wReact>yo
? 'Allo ManuelDeLeon! What would you like to do? Aspnetcore Spa

Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo aspnetcore-spa


     _-----_     ╭──────────────────────────╮
    |       |    │  Welcome to the ASP.NET  │
    |--(o)--|    │   Core Single-Page App   │
   `---------´   │        generator!        │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

? Framework React
? Your project name wReact
Will restore NPM dependencies using 'yarn' installed at C:\Users\manuel.de.leon\AppData\Roaming\npm\yarn.CMD


I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.


   create package.json
   create .babelrc
   create appsettings.json
   create ClientApp\boot.tsx
   create ClientApp\components\Counter.tsx
   create ClientApp\components\FetchData.tsx
   create ClientApp\components\Home.tsx
   create ClientApp\components\Layout.tsx
   create ClientApp\components\NavMenu.tsx
   create ClientApp\css\site.css
   create ClientApp\routes.tsx
   create Controllers\HomeController.cs
   create Controllers\SampleDataController.cs
   create Dockerfile
   create package.json.tmp
   create Program.cs
   create project.json
   create README.md
   create Startup.cs
   create .gitignore
   create node_modules\_placeholder.txt
   create WReact.xproj
   create tsconfig.json
   create Views\_ViewImports.cshtml
   create Views\_ViewStart.cshtml
   create Views\Home\Index.cshtml
   create Views\Shared\_Layout.cshtml
   create Views\Shared\Error.cshtml
   create web.config
   create webpack.config.js
   create webpack.config.vendor.js
   create wwwroot\dist\_placeholder.txt
   create wwwroot\favicon.ico
yarn install v0.16.1
info No lockfile found.
warning WReact@0.0.0: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.0.15: The platform "win32" is incompatible with this module.
info "fsevents@1.0.15" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠁ fsevents: node-pre-gyp ERR!
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
[-/1] ⠁ waiting...
error Error running install script for optional dependency: "C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents: Command failed.\nExit code: 1\nCommand: C:\\windows\\system32\\cmd.exe\nArguments: /d /s /c node-pre-gyp install --fallback-to-build\nDirectory: C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using node-pre-gyp@0.6.29\nnode-pre-gyp info using node@6.7.0 | win32 | x64\nnode-pre-gyp info check checked for \"C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v48-win32-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v48-win32-x64.tar.gz\nnode-pre-gyp ERR! Tried to download: https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v48-win32-x64.tar.gz \nnode-pre-gyp ERR! Pre-built binaries not found for fsevents@1.0.15 and node@6.7.0 (node-v48 ABI) (falling back to source compile with node-gyp) \nnode-pre-gyp http Pre-built binary not available for your system, looked for https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.0.15/fse-v1.0.15-node-v48-win32-x64.tar.gz \n\r\nC:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" clean )  else (node  clean ) \r\ngyp info it worked if it ends with ok\ngyp info using node-gyp@3.4.0\ngyp info using node@6.7.0 | win32 | x64\ngyp info ok \n\r\nC:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents>if not defined npm_config_node_gyp (node \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" configure --fallback-to-build --module=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 )  else (node  configure --fallback-to-build --module=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64 ) \r\ngyp info it worked if it ends with ok\ngyp info using node-gyp@3.4.0\ngyp info using node@6.7.0 | win32 | x64\ngyp info spawn C:\\Python27\\python.EXE\ngyp info spawn args [ 'C:\\\\Users\\\\manuel.de.leon\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\gyp\\\\gyp_main.py',\ngyp info spawn args   'binding.gyp',\ngyp info spawn args   '-f',\ngyp info spawn args   'msvs',\ngyp info spawn args   '-G',\ngyp info spawn args   'msvs_version=auto',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents\\\\build\\\\config.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\manuel.de.leon\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\addon.gypi',\ngyp info spawn args   '-I',\ngyp info spawn args   'C:\\\\Users\\\\manuel.de.leon\\\\.node-gyp\\\\6.7.0\\\\include\\\\node\\\\common.gypi',\ngyp info spawn args   '-Dlibrary=shared_library',\ngyp info spawn args   '-Dvisibility=default',\ngyp info spawn args   '-Dnode_root_dir=C:\\\\Users\\\\manuel.de.leon\\\\.node-gyp\\\\6.7.0',\ngyp info spawn args   '-Dnode_gyp_dir=C:\\\\Users\\\\manuel.de.leon\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp',\ngyp info spawn args   '-Dnode_lib_file=node.lib',\ngyp info spawn args   '-Dmodule_root_dir=C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents',\ngyp info spawn args   '--depth=.',\ngyp info spawn args   '--no-parallel',\ngyp info spawn args   '--generator-output',\ngyp info spawn args   'C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents\\\\build',\ngyp info spawn args   '-Goutput_dir=.' ]\nTraceback (most recent call last):\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\gyp_main.py\", line 16, in <module>\r\n    sys.exit(gyp.script_main())\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 545, in script_main\r\n    return main(sys.argv[1:])\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 538, in main\r\n    return gyp_main(args)\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\__init__.py\", line 523, in gyp_main\r\n    generator.GenerateOutput(flat_list, targets, data, params)\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 2003, in GenerateOutput\r\n    sln_projects, project_objects, flat=msvs_version.FlatSolution())\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1762, in _GatherSolutionFolders\r\n    return _DictsToFolders('', root, flat)\r\n  File \"C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\gyp\\pylib\\gyp\\generator\\msvs.py\", line 1715, in _DictsToFolders\r\n    for folder, contents in bucket.iteritems():\r\nAttributeError: 'MSVSProject' object has no attribute 'iteritems'\r\ngyp ERR! configure error \ngyp ERR! stack Error: `gyp` failed with exit code: 1\ngyp ERR! stack     at ChildProcess.onCpExit (C:\\Users\\manuel.de.leon\\AppData\\Roaming\\npm\\node_modules\\yarn\\node_modules\\node-gyp\\lib\\configure.js:305:16)\ngyp ERR! stack     at emitTwo (events.js:106:13)\ngyp ERR! stack     at ChildProcess.emit (events.js:191:7)\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)\ngyp ERR! System Windows_NT 10.0.10586\ngyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Users\\\\manuel.de.leon\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\yarn\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"configure\" \"--fallback-to-build\" \"--module=C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\\\\fse.node\" \"--module_name=fse\" \"--module_path=C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents\\\\lib\\\\binding\\\\Release\\\\node-v48-win32-x64\"\ngyp ERR! cwd C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\ngyp ERR! node -v v6.7.0\ngyp ERR! node-gyp -v v3.4.0\ngyp ERR! not ok \nnode-pre-gyp ERR! build error \nnode-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd configure --fallback-to-build --module=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64\\fse.node --module_name=fse --module_path=C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\lib\\binding\\Release\\node-v48-win32-x64' (1)\nnode-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\\node_modules\\node-pre-gyp\\lib\\util\\compile.js:83:29)\nnode-pre-gyp ERR! stack     at emitTwo (events.js:106:13)\nnode-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)\nnode-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)\nnode-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)\nnode-pre-gyp ERR! System Windows_NT 10.0.10586\nnode-pre-gyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\MyFiles\\\\ViewModel\\\\repros\\\\wReact\\\\node_modules\\\\fsevents\\\\node_modules\\\\node-pre-gyp\\\\bin\\\\node-pre-gyp\" \"install\" \"--fallback-to-build\"\nnode-pre-gyp ERR! cwd C:\\MyFiles\\ViewModel\\repros\\wReact\\node_modules\\fsevents\nnode-pre-gyp ERR! node -v v6.7.0\nnode-pre-gyp ERR! node-pre-gyp -v v0.6.29\nnode-pre-gyp ERR! not success Saved lockfile.
Done in 23.66s.
C:\MyFiles\ViewModel\repros\wReact\WReact.xproj(8,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Hash: a3af6b1f3df9e38bd254
Version: webpack 1.13.3
Time: 3217ms
                               Asset     Size  Chunks             Chunk Names
89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]
                           vendor.js  1.48 MB       0  [emitted]  vendor
                          vendor.css   315 kB       0  [emitted]  vendor
   [0] dll vendor 12 bytes {0} [built]
    + 294 hidden modules
Child extract-text-webpack-plugin:
        + 7 hidden modules
Hash: 4f2367645d019aede5f4
Version: webpack 1.13.3
Time: 4380ms
      Asset     Size  Chunks             Chunk Names
    main.js  45.4 kB       0  [emitted]  main
main.js.map  30.3 kB       0  [emitted]  main
    + 16 hidden modules

ERROR in ./ClientApp/components/FetchData.tsx
(16,19): error TS2345: Argument of type '(data: WeatherForecast[]) => void' is not assignable to parameter of type '(value: IResponse) => void | PromiseLike<void>'.
  Types of parameters 'data' and 'value' are incompatible.
    Type 'IResponse' is not assignable to type 'WeatherForecast[]'.
      Property 'length' is missing in type 'IResponse'.

     _-----_     ╭───────────────────────╮
    |       |    │      Bye from us!     │
    |--(o)--|    │       Chat soon.      │
   `---------´   │      Yeoman team      │
    ( _´U`_ )    │    http://yeoman.io   │
    /___A___\   /╰───────────────────────╯
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `
@MarkPieszak
Copy link
Contributor

MarkPieszak commented Nov 22, 2016

Did you install VS2017, it installs .NET Core 1.1 with it, I believe this is part of the problem. Since the projects are still on 1.0.1, since 1.1 was released so recently.

Duplicate of #440 ?

@ManuelDeLeon
Copy link
Author

I'll try removing .NET Core 1.1 SDK and installing v1.0.1

Duplicate of #440 ?
Probably

@ManuelDeLeon
Copy link
Author

Yep, removing .NET Core 1.1 SDK and installing v1.0.1 fixed it (didn't uninstall VS2017)

@MarkPieszak
Copy link
Contributor

The other fix is adding a global.json that tells the project to use your local 1.0.1 copy.
https://github.com/MarkPieszak/aspnetcore-angular2-universal/blob/master/global.json#L3

Glad you got it fixed! @ManuelDeLeon

@ManuelDeLeon
Copy link
Author

ManuelDeLeon commented Nov 25, 2016

@MarkPieszak

I get the same error when I try to deploy to Azure App Services:

     1>Project "D:\home\site\repository\Jsservicesviewmodel.xproj" on node 1 (Publish target(s)).
     1>D:\home\site\repository\Jsservicesviewmodel.xproj(8,3): error MSB4019: The imported project "D:\Program Files (x86)\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
     1>Done Building Project "D:\home\site\repository\Jsservicesviewmodel.xproj" (Publish target(s)) -- FAILED.

Build FAILED.

What can I do to deploy it on Azure App Services since it doesn't like the default .xproj?

Edit: Just to be clear, that error is in the Azure logs.

@MarkPieszak
Copy link
Contributor

The error came up even after adding a global.json file?

@ManuelDeLeon
Copy link
Author

I then get "path too long" =/

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\project.json...
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/index.json
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/index.json 160ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/1.0.0-beta-000019/microsoft.aspnetcore.reactservices.1.0.0-beta-000019.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/1.0.0-beta-000019/microsoft.aspnetcore.reactservices.1.0.0-beta-000019.nupkg 141ms
Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in D:\home\site\repository\project.json...
Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in D:\home\site\repository\project.json...
Restoring packages for tool 'Microsoft.DotNet.Watcher.Tools' in D:\home\site\repository\project.json...
Committing restore...
Lock file has not changed. Skipping lock file write. Path: D:\home\site\repository\project.lock.json
D:\home\site\repository\project.json
Restore completed in 6374ms.

NuGet Config files used:
    C:\DWASFiles\Sites\#1jssviewmodel\AppData\NuGet\NuGet.Config

Feeds used:
    https://api.nuget.org/v3/index.json
Publishing repository for .NETCoreApp,Version=v1.0
npm WARN package.json jsservicesviewmodel@0.0.0 No repository field.
npm WARN package.json jsservicesviewmodel@0.0.0 No license field.
Hash: 14681ea815803bf8a9a8
Version: webpack 1.13.3
Time: 22721ms
    Asset    Size  Chunks             Chunk Names
vendor.js  437 kB       0  [emitted]  vendor
   [0] dll vendor 12 bytes {0} [built] [1 error]
    + 285 hidden modules
ERROR in Cannot find module 'caniuse-db/features-json/transforms2d.json'
 @ dll vendor
Hash: 7152126a5b6cfc6a8d0d4870620e3462c6bfa961
Version: webpack 1.13.3
Child
    Hash: 7152126a5b6cfc6a8d0d
    Version: webpack 1.13.3
    Time: 267ms
        + 1 hidden modules
    
    ERROR in Cannot find module 'core-js/library/fn/symbol/iterator'
Child
    Hash: 4870620e3462c6bfa961
    Version: webpack 1.13.3
    Time: 251ms
        + 1 hidden modules
    
    ERROR in Cannot find module 'core-js/library/fn/symbol/iterator'
Project repository (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling repository for .NETCoreApp,Version=v1.0

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:50.9344088
 

Configuring the following project for use with IIS: 'D:\local\Temp\8d41556b6683d27'
Updating web.config at 'D:\local\Temp\8d41556b6683d27\web.config'
Configuring project completed successfully
publish: Published to D:\local\Temp\8d41556b6683d27
Published 1/1 projects successfully
KuduSync.NET from: 'D:\local\Temp\8d41556b6683d27' to: 'D:\home\site\wwwroot'
Deleting file: 'hostingstart.html'
Copying file: 'appsettings.json'
Copying file: 'Microsoft.AspNetCore.Antiforgery.dll'
Copying file: 'Microsoft.AspNetCore.Authorization.dll'
Copying file: 'Microsoft.AspNetCore.Cors.dll'
Copying file: 'Microsoft.AspNetCore.Cryptography.Internal.dll'
Copying file: 'Microsoft.AspNetCore.DataProtection.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.DataProtection.dll'
Copying file: 'Microsoft.AspNetCore.Diagnostics.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Diagnostics.dll'
Copying file: 'Microsoft.AspNetCore.Hosting.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Hosting.dll'
Copying file: 'Microsoft.AspNetCore.Hosting.Server.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Html.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Http.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Http.dll'
Copying file: 'Microsoft.AspNetCore.Http.Extensions.dll'
Copying file: 'Microsoft.AspNetCore.Http.Features.dll'
Copying file: 'Microsoft.AspNetCore.HttpOverrides.dll'
Copying file: 'Microsoft.AspNetCore.JsonPatch.dll'
Copying file: 'Microsoft.AspNetCore.Localization.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.ApiExplorer.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Core.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Cors.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.DataAnnotations.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Formatters.Json.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Localization.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Razor.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.Razor.Host.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.TagHelpers.dll'
Copying file: 'Microsoft.AspNetCore.Mvc.ViewFeatures.dll'
Copying file: 'Microsoft.AspNetCore.NodeServices.dll'
Copying file: 'Microsoft.AspNetCore.Razor.dll'
Copying file: 'Microsoft.AspNetCore.Razor.Runtime.dll'
Copying file: 'Microsoft.AspNetCore.Routing.Abstractions.dll'
Copying file: 'Microsoft.AspNetCore.Routing.dll'
Copying file: 'Microsoft.AspNetCore.Server.IISIntegration.dll'
Copying file: 'Microsoft.AspNetCore.Server.Kestrel.dll'
Copying file: 'Microsoft.AspNetCore.SpaServices.dll'
Copying file: 'Microsoft.AspNetCore.StaticFiles.dll'
Copying file: 'Microsoft.AspNetCore.WebUtilities.dll'
Copying file: 'Microsoft.DotNet.InternalAbstractions.dll'
Copying file: 'Microsoft.Extensions.Caching.Abstractions.dll'
Copying file: 'Microsoft.Extensions.Caching.Memory.dll'
Copying file: 'Microsoft.Extensions.Configuration.Abstractions.dll'
Copying file: 'Microsoft.Extensions.Configuration.Binder.dll'
Copying file: 'Microsoft.Extensions.Configuration.CommandLine.dll'
Omitting next output lines...
Processed 2000 files...
Processed 4260 files...
Processed 6507 files...
Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Failed exitCode=1, command="kudusync" -v 50 -f "D:\local\Temp\8d41556b6683d27" -t "D:\home\site\wwwroot" -n "D:\home\site\deployments\7d6a896e5d4affe6efc616b19b684b16ca392f1b\manifest" -p "D:\Program Files (x86)\SiteExtensions\Kudu\59.51122.2559\bin\Scripts\firstDeploymentManifest" -i ".git;.hg;.deployment;deploy.cmd"
An error has occurred during web site deployment.
npm WARN package.json jsservicesviewmodel@0.0.0 No repository field.\r\nnpm WARN package.json jsservicesviewmodel@0.0.0 No license field.\r\nError: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51122.2559\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

@MarkPieszak
Copy link
Contributor

@SteveSandersonMS Any ideas what could be causing this one, we figured out the 1.1 Core issue, but now he's getting path too long etc when deploying to Azure.

It almost looks like some things didn't get installed properly through npm?

@SteveSandersonMS
Copy link
Member

Did you remember to specify a Node version for Azure to use via WEBSITE_NODE_DEFAULT_VERSION on the Azure management portal? If you don't, it will use NPM 2.x which fails with path-too-long errors. See deployment steps at http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/#now-lets-deploy.

@ManuelDeLeon
Copy link
Author

ManuelDeLeon commented Nov 25, 2016

It has the default: WEBSITE_NODE_DEFAULT_VERSION: 4.4.7

(trying with 6.7.0)

@SteveSandersonMS
Copy link
Member

4.4.7 is too old. It includes NPM version 2.15.8. You need NPM >=3.0 for it to work properly on Windows.

Let us know how you go with Node 6.7.0.

@ManuelDeLeon
Copy link
Author

Different log but it still ends up with "path too long" plus there's ERROR in Cannot find module 'core-js/library/fn/symbol/iterator' in the middle.

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\project.json...
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/index.json
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/index.json 152ms
  GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/1.0.0-beta-000019/microsoft.aspnetcore.reactservices.1.0.0-beta-000019.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.reactservices/1.0.0-beta-000019/microsoft.aspnetcore.reactservices.1.0.0-beta-000019.nupkg 137ms
Restoring packages for tool 'Microsoft.AspNetCore.Razor.Tools' in D:\home\site\repository\project.json...
Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in D:\home\site\repository\project.json...
Restoring packages for tool 'Microsoft.DotNet.Watcher.Tools' in D:\home\site\repository\project.json...
Committing restore...
Lock file has not changed. Skipping lock file write. Path: D:\home\site\repository\project.lock.json
D:\home\site\repository\project.json
Restore completed in 6155ms.

NuGet Config files used:
    C:\DWASFiles\Sites\#1jssviewmodel\AppData\NuGet\NuGet.Config

Feeds used:
    https://api.nuget.org/v3/index.json
Publishing repository for .NETCoreApp,Version=v1.0
jsservicesviewmodel@0.0.0 D:\home\site\repository
npm WARN optional Skipping failed optional dependency /webpack/watchpack/chokidar/fsevents:
+-- babel-preset-es2015@6.18.0
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15
| `-- babel-plugin-transform-es2015-computed-properties@6.8.0
npm WARN jsservicesviewmodel@0.0.0 No repository field.
|   +-- babel-helper-define-map@6.18.0
npm WARN jsservicesviewmodel@0.0.0 No license field.
|   | `-- babel-helper-function-name@6.18.0
|   |   `-- babel-traverse@6.19.0
|   |     +-- babel-code-frame@6.16.0
|   |     | +-- chalk@1.1.3 
|   |     | | +-- ansi-styles@2.2.1 
|   |     | | +-- escape-string-regexp@1.0.5 
|   |     | | +-- has-ansi@2.0.0 
|   |     | | +-- strip-ansi@3.0.1 
|   |     | | `-- supports-color@2.0.0 
|   |     | +-- esutils@2.0.2 
|   |     | `-- js-tokens@2.0.0 
|   |     +-- debug@2.3.3
|   |     | `-- ms@0.7.2 
|   |     `-- invariant@2.2.2
|   |       `-- loose-envify@1.3.0 
|   `-- babel-template@6.16.0
|     `-- babel-traverse@6.19.0
|       `-- babel-code-frame@6.16.0
|         `-- chalk@1.1.3
|           `-- has-ansi@2.0.0
|             `-- ansi-regex@2.0.0 
`-- react-dom@15.4.1
  `-- fbjs@0.8.6
    +-- isomorphic-fetch@2.2.1
    | `-- node-fetch@1.6.3
    |   +-- encoding@0.1.12 
    |   | `-- iconv-lite@0.4.15 
    |   `-- is-stream@1.1.0 
    `-- promise@7.1.1
      `-- asap@2.0.5 
Hash: e61cc3dc474d9ac688fa
Version: webpack 1.13.3
Time: 27030ms
    Asset    Size  Chunks             Chunk Names
vendor.js  437 kB       0  [emitted]  vendor
   [0] dll vendor 12 bytes {0} [built] [1 error]
    + 285 hidden modules
ERROR in Cannot find module 'caniuse-db/features-json/transforms2d.json'
 @ dll vendor
Hash: 7152126a5b6cfc6a8d0d4870620e3462c6bfa961
Version: webpack 1.13.3
Child
    Hash: 7152126a5b6cfc6a8d0d
    Version: webpack 1.13.3
    Time: 314ms
        + 1 hidden modules
    
    ERROR in Cannot find module 'core-js/library/fn/symbol/iterator'
Child
    Hash: 4870620e3462c6bfa961
    Version: webpack 1.13.3
    Time: 299ms
        + 1 hidden modules
    
    ERROR in Cannot find module 'core-js/library/fn/symbol/iterator'
Project repository (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
Configuring the following project for use with IIS: 'D:\local\Temp\8d415675f51018c'
Updating web.config at 'D:\local\Temp\8d415675f51018c\web.config'
Configuring project completed successfully
publish: Published to D:\local\Temp\8d415675f51018c
Published 1/1 projects successfully
KuduSync.NET from: 'D:\local\Temp\8d415675f51018c' to: 'D:\home\site\wwwroot'
Copying file: 'repository.deps.json'
Copying file: 'repository.runtimeconfig.json'
Copying file: 'node_modules\.bin\loose-envify'
Copying file: 'node_modules\.bin\loose-envify.cmd'
Copying file: 'node_modules\ansi-regex\index.js'
Copying file: 'node_modules\ansi-regex\license'
Copying file: 'node_modules\ansi-regex\package.json'
Copying file: 'node_modules\ansi-regex\readme.md'
Copying file: 'node_modules\ansi-styles\index.js'
Copying file: 'node_modules\ansi-styles\license'
Copying file: 'node_modules\ansi-styles\package.json'
Copying file: 'node_modules\ansi-styles\readme.md'
Copying file: 'node_modules\asap\asap.js'
Copying file: 'node_modules\asap\browser-asap.js'
Copying file: 'node_modules\asap\browser-raw.js'
Copying file: 'node_modules\asap\CHANGES.md'
Copying file: 'node_modules\asap\LICENSE.md'
Copying file: 'node_modules\asap\package.json'
Copying file: 'node_modules\asap\raw.js'
Copying file: 'node_modules\asap\README.md'
Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Copying file: 'node_modules\babel-preset-es2015\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-helper-define-map\node_modules\babel-helper-function-name\node_modules\babel-helper-get-function-arity\package.json'
Failed exitCode=1, command="kudusync" -v 50 -f "D:\local\Temp\8d415675f51018c" -t "D:\home\site\wwwroot" -n "D:\home\site\deployments\7d6a896e5d4affe6efc616b19b684b16ca392f1b\manifest" -p "D:\Program Files (x86)\SiteExtensions\Kudu\59.51122.2559\bin\Scripts\firstDeploymentManifest" -i ".git;.hg;.deployment;deploy.cmd"
An error has occurred during web site deployment.
npm WARN optional Skipping failed optional dependency /webpack/watchpack/chokidar/fsevents:\r\nnpm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15\r\nnpm WARN jsservicesviewmodel@0.0.0 No repository field.\r\nnpm WARN jsservicesviewmodel@0.0.0 No license field.\r\nError: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51122.2559\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Nov 25, 2016

I'm afraid I don't know why you'd still be getting the path-too-long issue if it's now actually using NPM v3.x during deployment. It makes me suspicious that maybe it's actually still using NPM 2.x. Is there any other evidence in the log to confirm what NPM version it's using?

One bit of good news is that pretty soon, issues like this will no longer be a concern. The templates are changing so that you will no longer need to deploy package.json or node_modules to production at all. The server-side prerendering feature will be able to run from completely self-contained bundles that never invoke require at runtime. So, deployments will be much faster, and won't involve NPM at all. This feature should be ready next week.

I know that doesn't fix your immediate issue right now (since the new feature hasn't shipped yet). If you're able to repro the deployment issue in a simpler way (e.g., try just deploying a completely empty site that has nothing except your package.json, and see if Kudu still fails to restore the dependencies even after confirming you're using NPM 3.x), then you might want to report that to the Azure/Kudu teams.

@MarkPieszak
Copy link
Contributor

MarkPieszak commented Nov 27, 2016

Is this a new upcoming feature to azure you're talking about, or to .NET Core and somehow caching node modules you want?

Sounds exciting either way!

@ManuelDeLeon
Copy link
Author

Can't wait for it. What's the time frame we're talking about here? If it's a few weeks then I'll probably just wait. More than that and I'll probably keep banging my head against the wall.

About my issue, it's definitely using a new node/npm (confirmed via Azure's command line):

  "engines": {
    "node": "7.1.0",
    "npm": "3.10.9"
  },

But I'm still getting these two errors:

ERROR in ./ClientApp/boot-client.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "D:\\home\\site\\repository"

and further down:

Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Are either of these due to JS Services configuration? If not, how can I contact the Azure or Kudu people?

Thanks for all the help.

@ManuelDeLeon
Copy link
Author

Interesting, the babel-preset-es2015 folder is empty:

image

Maybe it's a problem with the es2015 preset version. I'll keep looking.

@ManuelDeLeon
Copy link
Author

I'm very sorry for the trouble. As it turns out updating the node version in Azure still leaves all the deeply nested files in node_modules. It works correctly if you use a new app service and create the global.json file + set the node version from the get go. In my case I didn't know how to reset it so I had to delete the app and create it again.

Thank you for your patience.

@MarkPieszak
Copy link
Contributor

Oh great so, just for clarity if anyone else runs into it:

  • Deleted the app from Azure.
  • Set the Azure Node version to 7 (since we require npm3+)
  • Added the global.json file to pinpoint the version of .NET Core we need (1.0.1 at the moment)
  • Git push the app back onto Azure

Glad you got it working!

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Nov 28, 2016

@MarkPieszak:

Is this a new upcoming feature to azure you're talking about, or to .NET Core and somehow caching node modules you want?

It's just a change to the default Webpack config that prepares a completely standalone server-side prerendering bundle (like how the client-side bundle is completely self-contained). This means that at runtime, it never calls Node's require to load anything from node_modules, so you don't even have to deploy that dir to production.

We need this because (1) people continue to struggle with deploying node_modules correctly, especially because of NPM 2.x issues on Windows, and (2) publishing from VS is epically slow if you include 20,000+ files from node_modules. This change will mean you only have 1 or 2 (large) .js files that contain everything needed for server-side prerendering, so publishing/deployment will be just as quick and risk-free as with any other ASP.NET site.

@MarkPieszak
Copy link
Contributor

I love it, that's a great idea. Yeah it seems to be a reoccurring issue :)

@SteveSandersonMS
Copy link
Member

That feature is published now (get the latest generator-aspnetcore-spa version 0.6.1 to see it - notice that dotnet publish won't emit a node_modules dir any more, yet it still works). Let me know if you can think of any issues with this!

@MarkPieszak
Copy link
Contributor

Will do, thanks again Steve!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants