question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get File Publish to work

See original GitHub issue

I can’t seem to get File Publish to build successfully. An ideas? I can’t figure out what comes after this bit to try to resolve it.

** I am using VS 2017

    TS7017: Element implicitly has an 'any' type because type 'Icons' has no index signature.
  Child extract-text-webpack-plugin:
         [0] ./~/css-loader/lib/css-base.js 2.19 kB {0} [built]
         [1] ./~/css-loader!./~/bootstrap/dist/css/bootstrap.css 201 kB {0} [built]
         [2] ./~/css-loader!./~/font-awesome/css/font-awesome.css 42 kB {0} [built]
         [3] ./~/base64-js/index.js 3.48 kB {0} [built]
         [4] ./~/buffer/index.js 48.6 kB {0} [built]
         [5] ./~/css-loader!./Client/styles/vendor.css 1.97 kB {0} [built]
         [6] ./~/font-awesome/fonts/fontawesome-webfont.eot 82 bytes {0} [built]
         [7] ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0 82 bytes {0} [built]
         [8] ./~/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0 82 bytes {0} [built]
         [9] ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0 82 bytes {0} [built]
        [10] ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 84 bytes {0} [built]
        [11] ./~/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 83 bytes {0} [built]
        [12] ./~/ieee754/index.js 2.05 kB {0} [built]
        [13] ./~/isarray/index.js 132 bytes {0} [built]
        [14] (webpack)/buildin/global.js 509 bytes {0} [built]
  Webpack Bundle Analyzer saved report to C:\NEW_StudentLock_Core\AspNetCoreSpa\wwwroot\dist\report.html
  
  npm ERR! Windows_NT 10.0.14393
  npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Azayzel\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:prod"
  npm ERR! node v6.6.0
  npm ERR! npm  v3.10.7
  npm ERR! code ELIFECYCLE
  npm ERR! aspnetnetcore@0.0.0 build:prod: `node node_modules/webpack/bin/webpack.js --config config/webpack.prod.js --env.prod`
  npm ERR! Exit status 2
  npm ERR! 
  npm ERR! Failed at the aspnetnetcore@0.0.0 build:prod script 'node node_modules/webpack/bin/webpack.js --config config/webpack.prod.js --env.prod'.
  npm ERR! Make sure you have the latest version of node.js and npm installed.
  npm ERR! If you do, this is most likely a problem with the aspnetnetcore package,
  npm ERR! not with npm itself.
  npm ERR! Tell the author that this fails on your system:
  npm ERR!     node node_modules/webpack/bin/webpack.js --config config/webpack.prod.js --env.prod
  npm ERR! You can get information on how to open an issue for this project with:
  npm ERR!     npm bugs aspnetnetcore
  npm ERR! Or if that isn't available, you can get their info via:
  npm ERR!     npm owner ls aspnetnetcore
  npm ERR! There is likely additional logging output above.
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     C:\NEW_StudentLock_Core\AspNetCoreSpa\npm-debug.log
C:\NEW_StudentLock_Core\AspNetCoreSpa\StudentLock.csproj(23,5): error MSB3073: The command "npm run build:prod" exited with code 1.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Azayzelcommented, May 25, 2017

Ok, when adding -f to npm build in .csproj, it builds perfect.


 <ItemGroup>
    <Compile Remove="node_modules\**\*;Client\**\*" />
    <Content Remove="wwwroot\dist\**\*" />
  </ItemGroup>  

  <Target Name="RunWebpack" BeforeTargets="BeforePublish">
     <Exec Command="npm run clean:dist" />
    <Exec Command="npm run build:prod -f" /> 
    <ItemGroup>
      <DistFiles Include="wwwroot\dist\**\*" />
      <Content Include="@(DistFiles)" CopytoPublishDirectory="Always" />
      <Content Include="app.yaml" CopyToOutputDirectory="Always" />
      <ContentWithTargetPath Include="@(DistFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="Always" />
    </ItemGroup>
  </Target>
0reactions
Azayzelcommented, May 25, 2017

Tried the above and i still get the below…

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Azayzel\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build:prod' ]
2 info using npm@4.6.1
3 info using node@v6.6.0
4 verbose run-script [ 'prebuild:prod', 'build:prod', 'postbuild:prod' ]
5 info lifecycle aspnetnetcore@0.0.0~prebuild:prod: aspnetnetcore@0.0.0
6 silly lifecycle aspnetnetcore@0.0.0~prebuild:prod: no script for prebuild:prod, continuing
7 info lifecycle aspnetnetcore@0.0.0~build:prod: aspnetnetcore@0.0.0
8 verbose lifecycle aspnetnetcore@0.0.0~build:prod: unsafe-perm in lifecycle true
9 verbose lifecycle aspnetnetcore@0.0.0~build:prod: PATH: C:\Users\Azayzel\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;c:\NEW_StudentLock_Core\AspNetCoreSpa\node_modules\.bin;C:\Users\Azayzel\AppData\Roaming\npm;C:\Program Files (x86)\nodejs\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common Files\Lenovo;C:\ProgramData\Lenovo\ReadyApps;C:\Program Files (x86)\Common Files\lenovo\easyplussdk\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Go\bin;c:\Go;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Users\Azayzel\AppData\Local\Microsoft\WindowsApps;c:\python27\python.exe;C:\Users\Azayzel\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.1.1;C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.1.1
10 verbose lifecycle aspnetnetcore@0.0.0~build:prod: CWD: c:\NEW_StudentLock_Core\AspNetCoreSpa
11 silly lifecycle aspnetnetcore@0.0.0~build:prod: Args: [ '/d /s /c',
11 silly lifecycle   'node node_modules/webpack/bin/webpack.js --config config/webpack.prod.js --env.prod' ]
12 silly lifecycle aspnetnetcore@0.0.0~build:prod: Returned: code: 2  signal: null
13 info lifecycle aspnetnetcore@0.0.0~build:prod: Failed to exec build:prod script
14 verbose stack Error: aspnetnetcore@0.0.0 build:prod: `node node_modules/webpack/bin/webpack.js --config config/webpack.prod.js --env.prod`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Azayzel\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Azayzel\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid aspnetnetcore@0.0.0
16 verbose cwd c:\<emitted>\AspNetCoreSpa
Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet publish Error: The process cannot access the file ...
I get the following error when tring to run dotnet publish : The process cannot access the file because it is being used...
Read more >
Publish error - the process cannot access the file
This error is caused by concurrency when two or more different processes try to access and lock the same file. A quick action...
Read more >
Files will not publish - Canvas Community
My issue was that the file that I was unable to fully publish was in a hidden folder. So, I navigated to the...
Read more >
After updating VS To 17.6.4, not publishing to configured ...
I just updated to version 17.6.4 from 17.3.x and since the update, I am unable to successfully run any of my ClickOnce publish...
Read more >
Publish doesn't work in Visual Studio 16.3.1
If so, please delete and re-create this pubxml. ... Right click the project name and choose 'Open Folder in File Explorer', delete all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found