Follow the instruction here: https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-for-SharePoint-Framework-Package-v1.5
on the release notes. Expected to be able to finish the upgrade and run "npm install".
Running "npm install" produces errors:
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Shai\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.12.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: 'node install.js'
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node install.js'.
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 phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\SPFx\dvp\npm-debug.log`
Follow the "how to upgrade" steps from the article:
Have to add: I have yet to have a single upgrade go through without errors. This is still a very painful and scary process.
Any help is appreciated!
Trying to upload my package.json and the npm-debug.log files but I cant upload any files here (Tried on all browsers including IE, they all say "something went really wrong, and we can't process that file" for a log or zip file).
Here is my package.json file:
{r tidy=FALSE}
{
"name": "dvp",
"version": "1.0.1",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"@microsoft/sp-client-base": "~1.0.0",
"@microsoft/sp-core-library": "~1.5.0-plusbeta",
"@microsoft/sp-webpart-base": "~1.5.0-plusbeta",
"@types/knockout": "3.4.55",
"@types/webpack-env": "1.13.1",
"@types/es6-promise": "0.0.33",
"knockout": "3.4.2"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.5.0-plusbeta",
"@microsoft/sp-module-interfaces": "~1.5.0-plusbeta",
"@microsoft/sp-webpart-workbench": "~1.5.0-plusbeta",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/mocha": ">=2.2.33 <2.6.0",
"gulp": "~3.9.1",
"knockout-paging": "^0.4.0"
},
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
}
}
Seems like the problem is with PhantomJS, can't get this package installed.
Even going to http://phantomjs.org/download.html and trying to download the windows version manually currently gives an error that the file is not found.
Any ideas? Anything I can do besides wait until someone fixes it?
FYI more info: running
yo @microsoft/sharepoint --plusbeta
to create a new project yields the same error message...
here is the complete output:
[email protected] install C:\testspfx\node_modules\node-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-57_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.0/win32-x64-57_binding.node":
connect ETIMEDOUT 52.216.168.43:443
Timed out whilst downloading the prebuilt binary
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
npm config set proxy http://example.com:8080
[email protected] install C:\testspfx\node_modules\phantomjs-prebuilt
node install.js
Considering PhantomJS found at C:\Users\xxx\AppData\Roaming\npm\phantomjs.CMD
Looks like an npm install -g on windows; skipping installed version.
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
Saving to C:\Users\xxx\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Receiving...
Error making request.
Error: connect ETIMEDOUT 52.216.168.43:443
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
Please report this full log at https://github.com/Medium/phantomjs
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\xxx\Shai\AppData\Roaming\npm-cache_logs\2018-06-21T17_03_52_895Z-debug.log
_=+#####!
###########| .-----------------------------------.
###/ (##|(@) | Congratulations! |
### ######| \ | Solution tester is created. |
###/ /###| (@) | Run gulp serve to play with it! |
####### ##| / '-----------------------------------'
### /##|(@)
###########|
**=+####!
Seems running this manually fixes this problem:
npm install [email protected] --ignore-scripts
npm install finishes correctly after that.
It just comes back with 5 flagged vulnerabilities which is a bit concerning.
Perhaps consider fixing it in the package or adding a note for this issue in the installation docs?
@cythomli I just followed the instructions here: https://github.com/SharePoint/sp-dev-docs/issues/2092#issuecomment-400119395
Nothing more, nothing less...
For your issue, it seems you were able to upgrade and to build. Did you delete node_modules folder and run npm install successfully?
@shaipetel - any change you can share the node, npm etc. version as --plusbeta option should absolutely work and has been validated by countless of people. Trying to understand what exactly goes wrong here. Thanks for the additional details advance.
@VesaJuvonen Hey, mine was a problem with PhantomJS.
The reason for it to fail was that this link:
https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip
did not exist when I opened the issue.
If I put it in your browser it showed a page not found error.
It seems that today, this link is up and working again so I suspect people trying it today won't experience the same issue.
Maybe someone by mistake deleted this ZIP file and now brought it back...
Very fragile all these dependencies, I can guarantee for sure that this link was down for 2 days...
I verified manually that I could not install that version of the package that the project was trying to install:
npm install [email protected]
produced this error.
There are a lot of talks about this is happening to people from time to time.
As I said, it seems running this manually resolves the issue:
npm install [email protected] --ignore-scripts
@VesaJuvonen I guess you could say it is just my bad luck trying it exactly when the url went down, but it seems that I always have that bad luck when upgrading SPFx packages.
I am 3 out of 3 so far in getting "bad luck" and something not working exactly when I am upgrading only to find out it is back up and running a day or two later...
So, I think MS should decide if you guys take some sort of ownership and responsibility over this (meaning: ALL packages and dependencies are monitored/maintained by MS) or if you leave us to the mercy of the "community", which I suspect a lot of companies won't be thrilled about.
@cythomli I also have the same issue that you posted in comments. Here is the link to the issue I posted. https://github.com/SharePoint/sp-dev-docs/issues/2062. I tried to follow the steps that @shaipetel mentioned for both 1.5.0 and 1.5.1 Sharepoint versions but it didn't work for me.
@shaipetel - Taking ownership over all the dependencies is not possible as we are not the owners of all the dependencies.
@mcmynn83 I understand that, of course. I was mentioning this to point out one disadvantage of the "new days" vs. the "old days", one that can potentially lead to losing hours or days of work.
In the old days, Microsoft would take ownership and responsibility for the framework from beginning to end, ensuring there is someone to handle any issues that come up.
In the new approach, a dependency from the framework itself (not something that I chose to use in my code) is a community project and that presents a problem and challenge, especially when such projects are discontinued or hosted on 3rd party servers (among other problems that may happen, such as spyware, malicious code, bugs, and so on).
We all know the benefits, I'm just helping (I hope) to shed some light on some of the disadvantages, so that we - the SPFx community - would know how to mitigate these risks.
One solution I can think of, is for me to include a copy of "node_modules" in our source control, just in case for rainy days such as that one.
A guideline or advise from Microsoft would be greatly appreciated as well by many, I'm sure.
Simply closing the issue and saying you cannot take ownership or responsibility might be the the truth but I'm not sure if this is the right answer.
I understand if I choose to use a library, it is my decision and my responsibility to verify it. But when it is a package used by SPFx framework itself, we have no choice but hope for the best.
I'll leave it as food for thought for the great team of SPFx,
thanks for your reply.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues